Fixed some more bugs with PHI generation and SSA instruction injection