Cannot add or update a child row: a foreign key constraint fails
It looks like civicrm is trying to record the change as being done with a different id than the contact that is trying to register (381 vs 374)

Are you sure you are properly anonymous? it might be that your site still think you are "someone else" (eg. the contact you deleted?). 

Could you try creating a new account from a "clean" computer, or if you can't, try doing it with your computer, but from an anonymous session (each browser has a different way of doing that, in firefox, it's File->New Private window) and see if you experience the same issue?

and if you do, could you temporarily disable the og_sync, to try to narrow down where the problem comes from?

X+