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.)
Probably, it should be:
```python
def reversed(self):
    ops = {Eq: Eq, Ne: Ne, Gt: Lt, Ge: Le, Lt: Gt, Le: Ge}
    return ops[self.func](*reversed(self.args))
```