check that sort with absolute references works in both modes

Change-Id: I7de490377fbceb17e7d678590c46d24674bd8024
(cherry picked from commit 674c7abbd6b5e9014812d4f8839f62639fe9a7f4)