Unset non-existing fields when restoring versions (see #5219)