[Git][ghc/ghc][wip/romes/25636] 9 commits: Add regression test for #18177