Fix race condition on syncing multiple repos with the same file contents

Bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1025897