fix using JSON in env_local

`$environment` was being set after the `array_merge()`, so local changes were blasted.