BACKLOG-4478 : fixed search with complex queries, avoid multiple isdescendantnode on extension node queries