Optimize setting default envs

Optimize by computing once which keys are present.