Create Phi Node in correct Block

This fixes some issues but most programs involving if/else are still
crashing.