Don't accidentally put GlobalRefs into a PhiNode
GlobalRefs (and Expr(:static_parameter)) are not legal to be moved
into PhiNodes because they may have side effects (throw an undefined
variable error), so they must remain at the place where they occurred
in the code.
Fixes #27240