Fix connected trees with the new overlapping detection