Fixed #23992 -- Optimized reorder_suite functions using OrderedSet