Fix sort_distinct method

Apparently List::MoreUtils::distinct works only on already sorted
arrays.