Recursive version of OntologyTermExpander