Expected behavior
Querying a bean with a Many to Many relationship and sorting on that relationship should not duplicate returned list. I am not sure if sorting by many to many relationship is a supported scenario.
Actual behavior
Query returns duplicate beans.
Steps to reproduce
Please see attached failing PR #3418