Pr/7338

Replaces  #7338

- [ ] I'm in the process of adding more cases in the core that are fine with disabling distinct.