Fix distinct on non-comparable type