somewhat confusing memory leak fix for Lua mob:giveItem()