fix stupid compile error
slightly more cautious fix for sorting the reason selector, #31702