Specify the precise semantics of when app env is queried
Add tests exercising application env fallback