Greatly simplified code to decide whether to reorder SequenceMatcher