What about `isFunctionDeclaration` and `findTemplateDeclRoot` here?