fix updating of the identity map when moving documents