Fix threaded issue on syncing locations

This issue only really comes up in big migrations, but domain/site_code
are unique-together so creating two objects with empty domain and site
code values breaks the unique constraint.