Preventing from dirtying internals while creating a record with an existing id

[Fixes #768]
Merge pull request #770 from Cyril-sf/bookkeeping

Preventing from dirtying internals while creating a record with an existing id