fix bugs in homonym detection on stree creation