[Git][ghc/ghc][wip/romes/27131] 59 commits: Add regression test for #18177