SVG backend doesn't fill loops if they occur in the same subtree as a line

This goes with its companion branch of SVG
Please have a careful look before merging and only merge with fill/SVG