ref #7745 fix bug in queries with subtree, some first test and cleanup