Fixed #22711 -- Adjusted ordering checks to allow implicit relation fields.

refs #19195.