Index: wp-admin/includes/meta-boxes.php
===================================================================
--- wp-admin/includes/meta-boxes.php	(revision 27299)
+++ wp-admin/includes/meta-boxes.php	(working copy)
@@ -705,7 +705,7 @@
 <?php
 		} // end empty pages check
 	} // end hierarchical check.
-	if ( 'page' == $post->post_type && 0 != count( get_page_templates() ) ) {
+	if ( 'page' == $post->post_type && 0 != count( get_page_templates( $post ) ) ) {
 		$template = !empty($post->page_template) ? $post->page_template : false;
 		?>
 <p><strong><?php _e('Template') ?></strong></p>
Index: wp-admin/includes/template.php
===================================================================
--- wp-admin/includes/template.php	(revision 27299)
+++ wp-admin/includes/template.php	(working copy)
@@ -741,7 +741,7 @@
  * @param string $default Optional. The template file name. Default empty.
  */
 function page_template_dropdown( $default = '' ) {
-	$templates = get_page_templates();
+	$templates = get_page_templates( get_post() );
 	ksort( $templates );
 	foreach ( array_keys( $templates ) as $template ) {
 		$selected = selected( $default, $templates[ $template ], false );
Index: wp-admin/includes/theme.php
===================================================================
--- wp-admin/includes/theme.php	(revision 27299)
+++ wp-admin/includes/theme.php	(working copy)
@@ -78,10 +78,11 @@
  *
  * @since 1.5.0
  *
+ * @param WP_Post|null $post Optional. The post being edited, provided for context.
  * @return array Key is the template name, value is the filename of the template
  */
-function get_page_templates() {
-	return array_flip( wp_get_theme()->get_page_templates() );
+function get_page_templates( $post = null ) {
+	return array_flip( wp_get_theme()->get_page_templates( $post ) );
 }
 
 /**
Index: wp-includes/class-wp-theme.php
===================================================================
--- wp-includes/class-wp-theme.php	(revision 27299)
+++ wp-includes/class-wp-theme.php	(working copy)
@@ -931,9 +931,10 @@
 	 * @since 3.4.0
 	 * @access public
 	 *
+	 * @param WP_Post|null $post Optional. The post being edited, provided for context.
 	 * @return array Array of page templates, keyed by filename, with the value of the translated header name.
 	 */
-	public function get_page_templates() {
+	public function get_page_templates( $post = null ) {
 		// If you screw up your current theme and we invalidate your parent, most things still work. Let it slide.
 		if ( $this->errors() && $this->errors()->get_error_codes() !== array( 'theme_parent_invalid' ) )
 			return array();
@@ -961,7 +962,7 @@
 		}
 
 		if ( $this->parent() )
-			$page_templates += $this->parent()->get_page_templates();
+			$page_templates += $this->parent()->get_page_templates( $post );
 
 		/**
 		 * Remove or rename page templates for a theme.
@@ -970,11 +971,12 @@
 		 *
 		 * @since 3.9.0
 		 *
-		 * @param array    $page_templates Array of page templates. Keys are filenames,
-		 *                                 values are translated names.
-		 * @param WP_Theme $this           The theme object.
+		 * @param array        $page_templates Array of page templates. Keys are filenames,
+		 *                                     values are translated names.
+		 * @param WP_Theme     $this           The theme object.
+		 * @param WP_Post|null $post           The post being edited, provided for context, or null.
 		 */
-		$return = apply_filters( 'page_templates', $page_templates, $this );
+		$return = apply_filters( 'page_templates', $page_templates, $this, $post );
 		return array_intersect_assoc( $return, $page_templates );
 	}
 
Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revision 27300)
+++ wp-includes/post.php	(working copy)
@@ -2948,7 +2948,7 @@
 
 	if ( !empty($page_template) && 'page' == $data['post_type'] ) {
 		$post->page_template = $page_template;
-		$page_templates = wp_get_theme()->get_page_templates();
+		$page_templates = wp_get_theme()->get_page_templates( $post );
 		if ( 'default' != $page_template && ! isset( $page_templates[ $page_template ] ) ) {
 			if ( $wp_error )
 				return new WP_Error('invalid_page_template', __('The page template is invalid.'));
