PIM-3217 Fix grid filter selector with duplicate group order

| Q                    | A
| -------------------- | ---
| Bug fix?             | Y
| New feature?         | N
| BC breaks?           | N
| CI currently passes? | ?
| Tests pass?          | Y
| Scenarios pass?      | ?
| Checkstyle issues?*  | N
| PMD issues?**        | N
| Changelog updated?   | Y
| Fixed tickets        | PIM-3217
| Doc PR               | ~