David
I was reading in the Modify EPUB PI topic and something
Duplicate Selectors

and changing their ORDER

when sorting could have significant effects on the document.
Maybe ?
1) Display a pre-sort warning if
dups are found and:
a) allow a Bailout
b) just refuse to proceed.
2) Use a 'bubble sort' so the order does not change. I know, Bubble Sorts are slow.