How to get a two layer sort with a taxonomy term relationship and avoid duplicates in a user view I have a user view, that needs to list users, sorted by the weight of an taxonomy term associated with the user via an entity reference field and added as a relationship in the view.  Once I've sorted by term weight, I next need to sort by the family name field of the user.  As soon as I add the second sort I start getting duplicates.  How can I accomplish the sort I need without the duplicates?

Turning on aggregation and grouping by the sort AND adding distinct to the query settings works in my simplified version of the view, but once I add in the other things the view won't load with aggregation on.

Update: I thought I had it simplified as far as it could go, but it turns out the relationship has nothing to do with it.  I get duplicates just be adding a sort of family name.  Curiouser and curiouser.
You need to add a filter that restricts family name to one language.

Credit: @ratface, answering this Q as per What should I do when an answer has been added as comment?