When two words are anagram-equivalent, the anagram ordering reports them as "equal." You may anasort them arbitrarily, according to the whimisical details of the sorting algorithm.
anasort
to: "Anagram-equivalent words may come in any order"