fixes bit check in pre_config_lock
fixes query_env uses in buildmixin so that c['env'] is used