after iterating over all blocks of the region, also iterate over the exit block which normally does not belong to the region. The exit block may contain PHI nodes that will later be moved into the region.
Such PHI nodes cannot yet occur without changes upstream (TempScopInfo, ScopDetection) which will follow.