Index: wp-includes/query.php
===================================================================
--- wp-includes/query.php	(revision 24720)
+++ wp-includes/query.php	(working copy)
@@ -3568,6 +3568,19 @@
 		global $wp_the_query;
 		return $wp_the_query === $this;
 	}
+
+	/**
+	 * After looping through a nested query, this function
+	 * restores the $post global to the current post in this query
+	 *
+	 * @return bool
+	 */
+	function reset_postdata() {
+		if ( !empty($this->post) ) {
+			$GLOBALS['post'] = $this->post;
+			setup_postdata($this->post);
+		}
+	}
 }
 
 /**
