Fix importing thesaurus with external hierarchical relations