core: get rid of dependencies on @env from mixin