[#55881744] fixing sorting of grouped and merged lines