Index: wp-includes/classes.php
===================================================================
--- wp-includes/classes.php	(revision 11993)
+++ wp-includes/classes.php	(working copy)
@@ -487,11 +487,15 @@
 	 */
 	function main($query_args = '') {
 		$this->init();
-		$this->parse_request($query_args);
-		$this->send_headers();
-		$this->query_posts();
-		$this->handle_404();
-		$this->register_globals();
+
+		if ( !defined( 'NO_QUERY' ) ) {
+			$this->parse_request($query_args);
+			$this->send_headers();
+			$this->query_posts();
+			$this->handle_404();
+			$this->register_globals();
+		}
+
 		do_action_ref_array('wp', array(&$this));
 	}
 
