We move around some uses of `coerce` to avoid coercing underneath `IO`, which triggers ghc#22519 on HEAD.