Fix InventoryList reading order

Lua does not guarantee that the indexes of a table will be in numerical order.