check function template is already visited