Fixed previously introduced scoping error by changing the env cache.
Merge branch 'master' into sqlite_rename