How Revit recognizes and indexs Duplicate?

As far as I’m aware, the internal Warnings only compare two elements for duplicate instances so you’ll only ever have them in pairs. You would either have to iteratively clean them up or use python to loop through and group “overlapping” pairs ahead of time. Even then, the second option could end up require iteration to cover all duplicates.