Fix for PR929. The PHI nodes were being gone through for each instruction