Make sure comments captured in the exact print annotations are in order of increasing location Closes #20718