Index: wp-includes/template.php
===================================================================
--- wp-includes/template.php	(revision 23294)
+++ wp-includes/template.php	(working copy)
@@ -315,20 +315,21 @@
 function get_attachment_template() {
 	global $posts;
 
+	$templates = array();
+
 	if ( ! empty( $posts ) && isset( $posts[0]->post_mime_type ) ) {
 		$type = explode( '/', $posts[0]->post_mime_type );
 
 		if ( ! empty( $type ) ) {
-			if ( $template = get_query_template( $type[0] ) )
-				return $template;
-			elseif ( $template = get_query_template( $type[1] ) )
-				return $template;
-			elseif ( $template = get_query_template( "$type[0]_$type[1]" ) )
-				return $template;
+			$templates[] = "$type[0].php";
+			$templates[] = "$type[1].php";
+			$templates[] = "$type[0]_$type[1].php";
 		}
 	}
 
-	return get_query_template( 'attachment' );
+	$templates[] = 'attachment.php';
+
+	return get_query_template( 'attachment', $templates );
 }
 
 /**
