Write test for and fix issue causing regression with SVG elements.