wrap the tree builder in a watcher for the query