Fix possible missing unlock of env_lock
Merge remote-tracking branch 'minetest/master' into merge2