Fix for importing document with unwrapped image as last child element
A DOCX that we were provided has an unwrapped image (with no <figure>
around it) as the last element. This crashed the code that was wrapping bare <img>
elements with a <figure>
to prevent later exporting problems.
(This is fixing side effects of things that should be fixed in XSweet – all images should be coming in wrapped in a <figure>
.)