Index: src/wp-includes/post.php
===================================================================
--- src/wp-includes/post.php	(revision 35946)
+++ src/wp-includes/post.php	(working copy)
@@ -4286,6 +4286,8 @@
  * Sub pages will be in the "directory" under the parent page post name.
  *
  * @since 1.5.0
+ * @since 4.4.0 Do not add parent slugs to orphaned pages
+ * @since 4.4.1 Support custom post statuses
  *
  * @param WP_Post|object|int $page Page object or page ID.
  * @return string|false Page URI, false on error.
@@ -4300,7 +4302,7 @@

 	foreach ( $page->ancestors as $parent ) {
 		$parent = get_post( $parent );
-		if ( 'publish' === $parent->post_status ) {
+		if ( ! in_array( $parent->post_status, get_post_stati( array( 'internal' => true ) ) ) ){
 			$uri = $parent->post_name . '/' . $uri;
 		}
 	}
Index: tests/phpunit/tests/post.php
===================================================================
--- tests/phpunit/tests/post.php	(revision 35946)
+++ tests/phpunit/tests/post.php	(working copy)
@@ -680,6 +680,30 @@
 	}

 	/**
+	 * @ticket 35084
+	 */
+	function test_get_post_uri_check_ancestor_post_status() {
+
+		$post_statuses = get_post_stati( array(), 'objects' );
+
+		foreach( $post_statuses as $index => $post_status ){
+			$parent_id = self::factory()->post->create( array( 'post_name' => 'parent_' . $index, 'post_status' => $post_status->name ) );
+			$child_id = self::factory()->post->create( array( 'post_name' => 'child_' . $index, 'post_parent' => $parent_id ) );
+
+			// check the parent for good measure
+			$this->assertEquals( 'parent_' . $index, get_page_uri( $parent_id ) );
+
+			// if the parent's post status is not an internal post status, it should be in the uri
+			if( ! ( $post_status->internal ) ){
+				$this->assertEquals( 'parent_' . $index . '/child_' . $index, get_page_uri( $child_id ) );
+			}
+			else{
+				$this->assertEquals( 'child_' . $index, get_page_uri( $child_id ) );
+			}
+		}
+	}
+
+	/**
 	 * @ticket 23708
 	 */
 	function test_get_post_ancestors_within_loop() {
