In post # 2 above Sangram’s advice seems worth a try.
anand gives similar advice and also a PR fix to refine a validation to prevent that case.
To identify exactly what non-unique Item records are causing the problem might help clarify your problem case. To inspect the database would require sql skills.