Fix distributed sync when no record is present yet.
Merge branch 'master' into gsa