Handle duplicates symmetrically
so that the first duplicate node causes
the parent to become attribute-free
and the all duplicates to live under
the parent together