Index: wp-includes/query.php
===================================================================
--- wp-includes/query.php	(revision 17587)
+++ wp-includes/query.php	(working copy)
@@ -2789,6 +2789,9 @@
 	 * @return bool True if posts are available, false if end of loop.
 	 */
 	function have_posts() {
+		if($this->empty){
+			return false;
+		}
 		if ( $this->current_post + 1 < $this->post_count ) {
 			return true;
 		} elseif ( $this->current_post + 1 == $this->post_count && $this->post_count > 0 ) {
@@ -2980,7 +2983,11 @@
 	function WP_Query($query = '') {
 		if ( ! empty($query) ) {
 			$this->query($query);
+			$this->empty = false;
 		}
+		else{
+			$this->empty = true;
+		}
 	}
 
 	/**
