I'm not convinced that this should ever happen.  If we are ever in a situation where we haven't yet stored credentials for the account, we certainly shouldn't be triggering sync with it.

I'm personally of the opinion that we should strip out of all of this code for storing new identity etc etc, and just immediately fail if the stored identity id is zero / non-existent.