Extended functionality to work in a multi-environment setup with environment GUID's on the model and the active environment set in apConfig.environment.