Fix very minor mem leak with lua loading
Lots of stuff. Create a new get_item_by_id index cache for maximum speed