Index: wp-admin/includes/ajax-actions.php
===================================================================
--- wp-admin/includes/ajax-actions.php	(revision 23184)
+++ wp-admin/includes/ajax-actions.php	(working copy)
@@ -1349,6 +1349,13 @@
 	if ( empty($data['ping_status']) )
 		$data['ping_status'] = 'closed';
 
+	// Hack: wp_unique_post_slug() doesn't work for
+	// drafts, so we will fake, that our post is published
+	if ( ! empty( $data['post_name'] ) && in_array( $post['post_status'], array( 'draft', 'pending' ) ) ) {
+		$post['post_status'] = 'publish';
+		$data['post_name'] = wp_unique_post_slug( $data['post_name'], $post['ID'], $post['post_status'], $post['post_type'], $post['post_parent'] );
+	}
+
 	// update the post
 	edit_post();
 
