fix phis from legalized switches properly, both targets and default target