Fix an error in doesInventoryContain.