Index: www/wp-includes/post.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/wp-includes/post.php	(revision 3ead692d7d09f22f73bd2b603e5062c4bef54551)
+++ www/wp-includes/post.php	(revision )
@@ -389,7 +389,7 @@
 	if ( empty( $post ) && isset( $GLOBALS['post'] ) )
 		$post = $GLOBALS['post'];
 
-	if ( is_a( $post, 'WP_Post' ) ) {
+	if ( is_a( $post, 'WP_Post' ) || ( isset( $post->is_custom ) && $post->is_custom ) ) {
 		$_post = $post;
 	} elseif ( is_object( $post ) ) {
 		if ( empty( $post->filter ) ) {
@@ -599,6 +599,15 @@
 	 * @var string
 	 */
 	public $filter;
+
+  /**
+ 	 * Allows get_post() to bypass the is_a( $post, 'WP_Post' ) check
+ 	 *
+ 	 * Does not correspond to a DB field.
+ 	 *
+ 	 * @var bool
+ 	 */
+	public $is_custom = false;
 
 	public static function get_instance( $post_id ) {
 		global $wpdb;
