First you create from scratch both an sfGuardUser instance and its associated sfGuardUserProfile.
Then you populate them.
Problem: the sfGuardUserProfile.user_id is not updated when the sfGuardUser instance is saved.
This update is done at the end of the getProfile() method but it is too early in that case since the sfGuardUser has no Id yet. This must also be done either in sfGuardUser::save() or sfGuardUser::doSave().
As a workaround for the time being, I created the following method in my actions.class.php:
protected function savesfGuardUser($sf_guard_user)
{
parent::savesfGuardUser($sf_guard_user);
$profile = $this->sf_guard_user->getProfile();
$profile->setUserId($sf_guard_user->getId());
$profile->save();
}