Fix the uniqueness test for item ids.