support for recursive template calls