Fix chef_env extraction logic.