Index: wp-admin/includes/media.php
===================================================================
--- wp-admin/includes/media.php	(revision 12065)
+++ wp-admin/includes/media.php	(working copy)
@@ -1101,18 +1101,17 @@
  * @return string HTML form for attachment.
  */
 function get_media_item( $attachment_id, $args = null ) {
-	global $redir_tab;
+	global $post_mime_types, $redir_tab;
 
-	$default_args = array( 'errors' => null, 'send' => true, 'delete' => true, 'toggle' => true, 'show_title' => true );
-	$args = wp_parse_args( $args, $default_args );
-	extract( $args, EXTR_SKIP );
-
-	global $post_mime_types;
 	if ( ( $attachment_id = intval($attachment_id) ) && $thumb_url = get_attachment_icon_src( $attachment_id ) )
 		$thumb_url = $thumb_url[0];
 	else
 		return false;
 
+	$default_args = array( 'errors' => null, 'send' => true, 'delete' => true, 'toggle' => true, 'show_title' => true );
+	$args = wp_parse_args( $args, $default_args );
+	extract( $args, EXTR_SKIP );
+
 	$toggle_on = __('Show');
 	$toggle_off = __('Hide');
 
@@ -1141,8 +1140,8 @@
 		$toggle_links = "
 	<a class='toggle describe-toggle-on' href='#'>$toggle_on</a>
 	<a class='toggle describe-toggle-off' href='#'>$toggle_off</a>";
-	if ( 'image' == $type )
-		$toggle_links .= "<a class='wp-post-thumbnail' href='#' onclick='WPSetAsThumbnail(\"" . intval( $attachment_id ) . "\");return false;'>" . esc_html__( "Use for thumbnail" ) . "</a>";
+		if ( 'image' == $type && get_post_image_id($_GET['post_id']) != $attachment_id )
+			$toggle_links .= "<a class='wp-post-thumbnail' href='#' onclick='WPSetAsThumbnail(\"$attachment_id\");return false;'>" . esc_html__( "Use as thumbnail" ) . "</a>";
 	} else {
 		$class = 'form-table';
 		$toggle_links = '';
