Reverted last changes that dealt with conditional allocations, and found a better solution. The problem actually had more to do with incorrectly handling if stmts that did not have an else case. Added a test case that demostrates this issue, though it should probably be improved upon by checking that the production stage of the pipeline only occurs in one branch. I also could not get the skip_stages pass to generate a conditional alloc, but I don't think that is essential to demonstrating the problem.