HPCC-11077 - Avoid RHS sort if isRightAlreadySorted

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>