fix array bounds check in InventoryTools.containsAtLeast()