The restrore process, restores a GeneratedDll entry that points to the archive location (a little odd, but not new). The previous check is to ensure it doesn't exist at the archive location already, i.e. if previously restored..

Other files in a restored workunit will never reference the archive path, so dstFile will never be same as srcFile.
dstFile could exist I suppose for some other reason, e.g. ops copied directory content from somewhere....
but I think probably fine to overwrite under the circumstances.