Moved the LuaItemHandler checking.
It shouldn't be in a function where handlers are created.