Flush the package log again after the metadata write

We also need to check if there have been any more additions, skipping the write
if the file on disk isn't going to be changed. This allows us to capture *all*
the merge information after the task has been finished.