Fixes #6960: Environments no longer disappear on environment selector.

I see. Code looks good. Will test it out later.