cherry-pick from github.com/minetest/minetest_game> Creative: Fix inventory crash after toggling creative mode in-game