WIP backport of fix for #20849 to GHC 9.2
An earlier partial fix was needed too. After that only small fixups were required. I've cherry picked both commits in this mr.
Haven't run a full validation yet.
An earlier partial fix was needed too. After that only small fixups were required. I've cherry picked both commits in this mr.
Haven't run a full validation yet.