phaseIdx in this for statement is actual active phase index, should not
active once again.
make the for statement more readable.
if all the phase are stagnate then stagnate will be true.
Merge pull request #220 from qilicun/fix_phase_idx

phaseIdx in this for statement is actual active phase index, should not active once again.