Always recompile the main target

When the file to check hasn't changed, the compilation is skipped. This
also means that no warnings are generated. To avoid this, the target is
now unloaded before it's loaded again.