Preserve tick ordering in 'tickTickedExpr'
Ticket: #27749 (closed).
This fixes a regression introduced in 2dadf3b0 in which source nodes were incorrectly moved past eachother.
Specifically, GHC.Core.Utils.tickTickedExpr tries to combine a tick t1 into an existing stack of ticks t2s. There are two situations:
t1is subsumed by a tick int2s: drop it.- A tick in
t2sis subsumed byt1, sayt2.
This MR ensures that in case (2) we keep t1 on the outside instead of replacing t2 at its position in the stack. This avoids re-ordering
source notes (which was the cause of #27749 (closed)).