Avoid stack-overflow.

When trying to compose(a,b), if no such composition is defined then
we should give an error instead of overflowing the stack.
Fix SVG backend for dashed lines.