[DF-4117] - generic approach to delete unused hierarchy tree items is implemented.