Fix --debug option.

It only showed messages processed after the phase correction, because of
a programming error.