Fix MAGN-5376 Element.Geometry not working after reopening file.

<h4>Summary</h4>

After creating an element, the change may not yet be updated to the database correctly before we are trying to get the internal geometries from it. This submission is fixing the issue by regenerating the document like what is done in some other places.

- [x] @pboyer
PTAL