Fix bug where SVG output would sometimes have extra </g> tag
Merge pull request #410 from ajablonski/bugfix/svg_XML_tag_mismatch

Fix bug where SVG output would sometimes have extra </g> tag