Do not throw CompilationTaskException when target is changed externally.

The way I tried to determine this did not work, throwing every
time after the first compilation.