Call the query_callbacks as early as possible in template_redirect