Resolves: tdf#149277 we don't want to search the whole tree for dups

just the immediate children of the supplied parent node

Change-Id: I79595fd940257615f0d012cb9a4556aea51d7db9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140986
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index 1dd94c3..24c9a83 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -200,7 +200,7 @@ std::unique_ptr<weld::TreeIter> TreeListBox::GetEntryPosByName(std::u16string_vi
                return xEntry;
            }
        }
    } while (m_xTreeView->iter_next(*xEntry));
    } while (m_xTreeView->iter_next_sibling(*xEntry));

    return nullptr;
}