Enhanced mod tpl's support for twig.