Index: wp-includes/comment.php
===================================================================
--- wp-includes/comment.php	(revision 12402)
+++ wp-includes/comment.php	(working copy)
@@ -898,8 +898,6 @@
 		$status = '0';
 
 	if ( wp_set_comment_status($comment_id, $status) ) {
-		delete_comment_meta($comment_id, '_wp_trash_meta_time');
-		delete_comment_meta($comment_id, '_wp_trash_meta_status');
 		do_action('untrashed_comment', $comment_id);
 		return true;
 	}
@@ -953,7 +951,6 @@
 		$status = '0';
 
 	if ( wp_set_comment_status($comment_id, $status) ) {
-		delete_comment_meta($comment_id, '_wp_trash_meta_status');
 		do_action('unspammed_comment', $comment_id);
 		return true;
 	}
@@ -1262,6 +1259,12 @@
 	}
 
 	$comment_old = wp_clone(get_comment($comment_id));
+	$old_status = $comment_old->comment_approved;
+	
+	if ( !in_array( $status, array('trash','spam') ) && in_array( $old_status, array('trash','spam') ) ) {
+		delete_comment_meta($comment_id, '_wp_trash_meta_time');
+		delete_comment_meta($comment_id, '_wp_trash_meta_status');
+	}
 
 	if ( !$wpdb->update( $wpdb->comments, array('comment_approved' => $status), array('comment_ID' => $comment_id) ) ) {
 		if ( $wp_error )
