Fix issue 1527

https://github.com/minetest/minetest/issues/1527