Add template inheritance and template insertion (see #6508)