feat/tagfunc: preventing too deep recursion in calls to 'tagfunc'.