Simpler, if hackier, distinctBy.