Add support for adding subnests to a template.