Index: src/wp-includes/taxonomy.php
===================================================================
--- src/wp-includes/taxonomy.php	(revision 26003)
+++ src/wp-includes/taxonomy.php	(working copy)
@@ -2135,8 +2135,14 @@
 	$name = wp_unslash($name);
 	$description = wp_unslash($description);
 
-	if ( empty($slug) )
-		$slug = sanitize_title($name);
+	if ( empty( $slug ) ) {
+		$_name = trim( $name );
+		$existing_term = get_term_by( 'name', $_name, $taxonomy );
+		if ( $existing_term )
+			$slug = $existing_term->slug;
+		else
+			$slug = sanitize_title( $name );
+	}
 
 	$term_group = 0;
 	if ( $alias_of ) {
Index: tests/phpunit/tests/taxonomy.php
===================================================================
--- tests/phpunit/tests/taxonomy.php	(revision 26003)
+++ tests/phpunit/tests/taxonomy.php	(working copy)
@@ -168,4 +168,29 @@
 		wp_set_object_terms( $post->ID, $term['term_id'], 'category' );
 		$this->assertTrue( in_category( $term['term_id'], $post ) );
 	}
+
+	function test_duplicate_name() {
+		$term = $this->factory->tag->create( array( 'name' => 'Bozo' ) );
+		$this->assertFalse( is_wp_error( $term ) );
+		$this->assertEmpty( $term->errors );
+
+		$term1 = $this->factory->tag->create( array( 'name' => 'Bozo', 'slug' => 'bozo1' ) );
+		$this->assertFalse( is_wp_error( $term1 ) );
+		$this->assertEmpty( $term1->errors );
+
+		$term2 = $this->factory->tag->create( array( 'name' => 'Bozo' ) );
+		$this->assertTrue( is_wp_error( $term2 ) );
+		$this->assertNotEmpty( $term2->errors );
+
+		$term3 = $this->factory->tag->create( array( 'name' => 'A+' ) );
+		$term4 = $this->factory->tag->create( array( 'name' => 'A++' ) );
+		$term5 = $this->factory->tag->create( array( 'name' => 'A+++' ) );
+		$term6 = $this->factory->tag->create( array( 'name' => 'A++++' ) );
+		$term7 = $this->factory->tag->create( array( 'name' => 'A++++' ) );
+		$this->assertTrue( is_wp_error( $term7 ) );
+		$this->assertNotEmpty( $term7->errors );
+
+		$terms = array_map( 'get_tag', array( $term3, $term4, $term5, $term6 ) );
+		$this->assertCount( 4, array_unique( wp_list_pluck( $terms, 'slug' ) ) );
+	}
 }
