Fix item loss due to moving items out of output-only inventory to an occupied slotTesting

c.f. https://github.com/minetest/minetest/issues/944