Fix trailing nils being dropped by deprecated minetest.env handler