check QueryTree wid matches as well