Allow language inheritance (i.e. SVG extends XML)

Fixes #3044
Depends on #3051