Fixed case where SyncUtil tried to delete nonexisting references.