Index: includes/core/theme-compat.php
===================================================================
--- includes/core/theme-compat.php	(revision 5935)
+++ includes/core/theme-compat.php	(working copy)
@@ -383,6 +383,10 @@
 	// Set the $post global
 	$post = new WP_Post( (object) $dummy );
 
+        // Add $post to cache to fix the bug if page template loads
+        // comments and triggers the error with missing post
+        wp_cache_add($post->ID, $post, 'posts');
+
 	// Copy the new post global into the main $wp_query
 	$wp_query->post       = $post;
 	$wp_query->posts      = array( $post );
