Fix possible missing unlock of env_lock