is_main_query() called incorrectly