Fixed root condition handling in tree view.