This reverts #46722, commit e0ab5d5feb4eb2d8af11b8dd9446c2b45fada8af.
Since #111167, commit 10b69dde3fd15334ea2382d2dc9e9a261de1afaf, we are
generating DWARF subprograms in a way that is meant to be more compatible
with LLVM's expectations, so hopefully we don't need this workaround
rewriting CUs anymore.