More updates to SSA generation - fixing bugs that came out in the test cases