Remove reference to dbname, fixes #4970
Fix migration err when menu nodes cannot be found
Avoid treeview node dups, ref #4409