Apply InitialOptimizations
more consistently in sorting
#47946
Merged
InitialOptimizations
more consistently in sorting
#47946