Adapting Per-Table template hierarchy according to the AbstractTemplateContext refactoring. refs #459