avoid duplicating trees that have the same name