FlattenCFG merges two 'if' basicblocks by inserting one basicblock
to another basicblock. The inserted basicblock can have a successor
that contains a PHI node whoes incoming basicblock is the inserted
basicblock. Since the existing code does not handle it, it becomes
successor - contains PHI node whose predecessor is cond2
if (cond1 || cond2)
(BB for cond2 was deleted)
successor - contains PHI node whose predecessor is cond2 --> bad ref!