Inside the next 'else', the getQuerySetQueries() is also used in a for loop where the tree nodes are added to the tree. I am not sure that returning a new tree will be easy. Please advise.