Draft: applied ulrich1a's fix to svg output - fixes #1365