diff --git a/wp-includes/media.php b/wp-includes/media.php
index 4003a41..50be3ee 100644
--- a/wp-includes/media.php
+++ b/wp-includes/media.php
@@ -788,6 +788,12 @@ function gallery_shortcode($attr) {
 	if ( 'RAND' == $order )
 		$orderby = 'none';
 
+	// Always exclude the post thumbnail
+	if ( empty( $exclude ) )
+		$exclude = get_post_thumbnail_id();
+	else
+		$exclude .= ',' . get_post_thumbnail_id();
+
 	if ( !empty($include) ) {
 		$include = preg_replace( '/[^0-9,]+/', '', $include );
 		$_attachments = get_posts( array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) );
