Fixed environment variable substituion of $VARIABLES, which didn't really work
previously due to internal dependency issues.

The reason it was noticed was the pyqtgraph test, whose package actually used this feature.
In a way, there should be a test for it ... .