I could instead add the right braces or manually ensure the XMLOpenElement destructor is run at the right time. Or I could just write what I actually want to happen. Fixes #1137. Change-Id: Ie1f157de1632571fb0c21e26d8e3cae56a6a6964