Fixed concurrency issue

New inserted values would at times not get saved to their revision.
This was caused by a call to `put` which didn't do anything since the
value hadn't changed. The call to `put` is replaced with a call to
`overwrite` that ensures that the value is overwritten