[wip] 8413 and 8373 related changes

See #8413 and #8373 

- [x] check coverage, especially the handling of duplicate args by Xor and Equivalent

(If anybody would like to take this over, that would be fine with me.)
I thought of that but then it becomes more complicated: if the sides are not trivially the same it may be difficult to determine which side goes with which. Perhaps it's possible. This is a step up from where we are at right now (which is zero).