Index: wp-admin/theme-editor.php
===================================================================
--- theme-editor.php	(revision 9903)
+++ theme-editor.php	(working copy)
@@ -135,12 +135,19 @@
 	<ul>
 <?php
 	$template_mapping = array();
+	$template_dir = $themes[$theme]['Template Dir']; //Or would it be better to use 'Stylesheet Dir'
 	foreach($themes[$theme]['Template Files'] as $template_file) {
 		$description = trim( get_file_description($template_file) );
 		$template_show = basename($template_file);
 		$filedesc = ( $description != $template_file ) ? "$description <span class='nonessential'>($template_show)</span>" : "$description";
 		$filedesc = ( $template_file == $file ) ? "<span class='highlight'>$description <span class='nonessential'>($template_show)</span></span>" : $filedesc;
-		$template_mapping[ $description ] = array( $template_file, $filedesc );
+
+		if( array_key_exists($description, $template_mapping) ){ //If it already exists in the array
+			$pos = strpos($template_file, $template_dir);
+			//If the 'Template Dir' was found in the $template_file
+			if( $pos !== false ) $template_mapping[ $description ] = array( $template_file, $filedesc );
+		}else $template_mapping[ $description ] = array( $template_file, $filedesc );
+
 	}
 	ksort( $template_mapping );
 	while ( list( $template_sorted_key, list( $template_file, $filedesc ) ) = each( $template_mapping ) ) :
