If a region ends with a block terminated by OpReturnValue or OpBranchConditional, and if the terminator uses an id defined in the region, then currently the transformed terminator uses the id defined in one part of the duplicated selection. It should instead use the id defined by the OpPhi that reconciles output ids from the two duplicated parts.