Repair broken logic in removeItem().