Try to repair the wp_query object after flags are set