Reordered header and query nested predicates for consistency