Iterator query execution order fix