Detecting error when the TemplateDef refers to a template which does not exist. Implemented the DAOFactory.stg stub. refs #418