patch #538: partial merge: fix validate function, fix double parent risk, fix display of wrong projects in hierarchy