Index: functions.php
===================================================================
--- functions.php	(revision 2786)
+++ functions.php	(working copy)
@@ -916,7 +916,7 @@
 
 // Setup global post data.
 function setup_postdata($post) {
-  global $id, $postdata, $authordata, $day, $page, $pages, $multipage, $more, $numpages, $wp_query;
+  global $wpdb, $id, $postdata, $authordata, $day, $page, $pages, $multipage, $more, $numpages, $wp_query;
 	global $pagenow;
 
 	$id = $post->ID;
@@ -931,7 +931,15 @@
 		$page = 1;
 	if (is_single() || is_page())
 		$more = 1;
-	$content = $post->post_content;
+
+	// check for missing post_content_filtered
+	if ( strlen($post->post_content_filtered) == 0 && strlen($post->post_content) != 0 ) {
+		// we need to run the filters
+		$post->post_content_filtered = apply_filters('the_content_filtered', $post->post_content);
+		$wpdb->query("UPDATE $wpdb->posts SET post_content_filtered = '$post->post_content_filtered' WHERE ID = '$post->ID'");
+	}
+
+	$content = $post->post_content_filtered;
 	if (preg_match('/<!--nextpage-->/', $content)) {
 		if ($page > 1)
 			$more = 1;
@@ -942,7 +950,7 @@
 		$pages = explode('<!--nextpage-->', $content);
 		$numpages = count($pages);
 	} else {
-		$pages[0] = $post->post_content;
+		$pages[0] = $post->post_content_filtered;
 		$multipage = 0;
 	}
 	return true;

