apply switch-related phi changes after illegal phis were erased