Fixing SVG close tag bug

The test fails on current master - I'm new to this library so I may have fixed it in the wrong way or missed other places where it would fail but this solves my problem.