Index: src/wp-includes/taxonomy.php
===================================================================
--- src/wp-includes/taxonomy.php	(revision 25364)
+++ src/wp-includes/taxonomy.php	(working copy)
@@ -482,13 +482,16 @@
  * @param string $object_type Name of the object type
  * @return bool True if successful, false if not
  */
-function register_taxonomy_for_object_type( $taxonomy, $object_type) {
+function register_taxonomy_for_object_type( $taxonomy, $object_type ) {
 	global $wp_taxonomies;
 
-	if ( !isset($wp_taxonomies[$taxonomy]) )
+	if ( ! isset( $wp_taxonomies[$taxonomy] ) )
 		return false;
 
-	if ( ! get_post_type_object($object_type) )
+	// If a single taxonomy handles both a post type and a non-post type, you
+	// can end up with ID conflicts, so we only allow this for post-type
+	// objects.
+	if ( ! get_post_type_object( $object_type ) )
 		return false;
 
 	if ( ! in_array( $object_type, $wp_taxonomies[$taxonomy]->object_type ) )
@@ -497,6 +500,38 @@
 	return true;
 }
 
+/**
+ * Remove an already registered taxonomy from an object type.
+ *
+ * @package WordPress
+ * @subpackage Taxonomy
+ * @since 3.7.0
+ * @uses $wp_taxonomies Modifies taxonomy object
+ *
+ * @param string $taxonomy Name of taxonomy object
+ * @param string $object_type Name of the object type
+ * @return bool True if successful, false if not
+ */
+function unregister_taxonomy_from_object_type( $taxonomy, $object_type ) {
+	global $wp_taxonomies;
+
+	if ( ! isset( $wp_taxonomies[$taxonomy] ) )
+		return false;
+
+	// For consistency with register_taxonomy_for_object_type()
+	if ( ! get_post_type_object( $object_type ) )
+		return false;
+
+	foreach ( array_keys( $wp_taxonomies[$taxonomy]->object_type ) as $array_key ) {
+		if ( $wp_taxonomies[$taxonomy]->object_type[$array_key] === $object_type ) {
+			unset( $wp_taxonomies[$taxonomy]->object_type[$array_key] );
+			return true;
+		}
+	}
+
+	return false;
+}
+
 //
 // Term API
 //
Index: tests/phpunit/tests/taxonomy.php
===================================================================
--- tests/phpunit/tests/taxonomy.php	(revision 25364)
+++ tests/phpunit/tests/taxonomy.php	(working copy)
@@ -103,4 +103,51 @@
 	function test_register_long_taxonomy() {
 		$this->assertInstanceOf( 'WP_Error', register_taxonomy( 'abcdefghijklmnopqrstuvwxyz0123456789', 'post', array() ) );
 	}
+
+	function test_registering_taxonomies_to_object_types() {
+
+		// Create a taonomy to test with
+		$tax = 'test_tax';
+		$this->assertFalse( taxonomy_exists($tax) );
+		register_taxonomy( $tax, 'post', array( 'hierarchical' => true ) );
+
+		// Create a post type to test with
+		$post_type = 'test_cpt';
+		$this->assertFalse( get_post_type( $post_type ) );
+		$this->assertObjectHasAttribute( 'name', register_post_type( $post_type ) );
+
+		// Core taxonomy, core post type
+		$this->assertTrue( unregister_taxonomy_from_object_type( 'category', 'post' ) );
+		$this->assertFalse( unregister_taxonomy_from_object_type( 'category', 'post' ) );
+		$this->assertTrue( register_taxonomy_for_object_type( 'category', 'post' ) );
+
+		// Core taxonomy, non-core post type
+		$this->assertTrue( register_taxonomy_for_object_type( 'category', $post_type ) );
+		$this->assertTrue( unregister_taxonomy_from_object_type( 'category', $post_type ) );
+		$this->assertFalse( unregister_taxonomy_from_object_type( 'category', $post_type ) );
+		$this->assertTrue( register_taxonomy_for_object_type( 'category', $post_type ) );
+
+		// Core taxonomies, non-post object types
+		$this->assertFalse( register_taxonomy_for_object_type( 'category', 'user' ) );
+		$this->assertFalse( unregister_taxonomy_from_object_type( 'category', 'user' ) );
+
+		// Non-core taxonomy, core post type
+		$this->assertTrue( unregister_taxonomy_from_object_type( $tax, 'post' ) );
+		$this->assertFalse( unregister_taxonomy_from_object_type( $tax, 'post' ) );
+		$this->assertTrue( register_taxonomy_for_object_type( $tax, 'post' ) );
+
+		// Non-core taxonomy, non-core post type
+		$this->assertTrue( register_taxonomy_for_object_type( $tax, $post_type ) );
+		$this->assertTrue( unregister_taxonomy_from_object_type( $tax, $post_type ) );
+		$this->assertFalse( unregister_taxonomy_from_object_type( $tax, $post_type ) );
+		$this->assertTrue( register_taxonomy_for_object_type( $tax, $post_type ) );
+
+		// Non-core taxonomies, non-post object types
+		$this->assertFalse( register_taxonomy_for_object_type( $tax, 'user' ) );
+		$this->assertFalse( unregister_taxonomy_from_object_type( $tax, 'user' ) );
+
+		unset($GLOBALS['wp_taxonomies'][$tax]);
+		_unregister_post_type( $post_type );
+
+	}
 }
