Fixed #277 - Prevent sync concurrency

Factor this out coz it is repeated on 344