Fix for the (usual) case of a CUSTOM_ENV not existing if no hooks have run to customise it.