This may get chalked up to "author error" but I feel like it's too easy for an author to unwittingly cause id collisions in their html output.
See live example here:
The source for this page of the live example starts off with
example xml:id="test-example"
p
p
example xml:id="test-example-2"
p
In html output each of the two <p> in the first example get a pretext-generated id that is simply the xml:id of the parent <example> appended with a counter. In particular, in output the second <p> of the first example gets transformed into
<div class="para" id="test-example-2">
But the second example gets transformed into
<article class="example example-like" id="test-example-2">
and now we have clashing ids. You can see the effect of this clash if you scroll all the way to the bottom of the linked page in the live example and click the xref you find there.
Of course, if only the author had been more logical in choosing their xml:id for the first example, say
xml:id="test-example-1"
then this clash would have been avoided, because then the two <p> in that example would have been transformed into
<div class="para" id="test-example-1-1">
<div class="para" id="test-example-1-2">
But probably best not to bet on authors being perfectly logical at all times...
Cheers,
Jeremy S