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 so (that's why I added it in d383cc72176e42d40db546ce7f6727acfd5924a2). But I removed it in consideration of #8309.