nope, you're safe. That's how you should do it anyway, to tell google which content is for which environment, so you're good...
Secondly (and on the topic itself), display:none is still not dangerous, but I should have mentioned in the previous post that this piece of code alone might not be enough to display the versions properly, so be sure that you're using the complete and right code)