diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module
index 3a9258b..b0b3fbe 100644
--- a/core/modules/taxonomy/taxonomy.module
+++ b/core/modules/taxonomy/taxonomy.module
@@ -1928,5 +1928,30 @@ function taxonomy_taxonomy_term_delete($term) {
 }
 
 /**
+ * Implements hook_field_delete_instance()
+ */
+function taxonomy_field_delete_instance($instance) {
+  if (variable_get('taxonomy_maintain_index_table', TRUE) && $instance['entity_type'] == 'node') {
+    $field_info = field_info_field($instance['field_name']);
+    if ($field_info['type'] == 'taxonomy_term_reference') {
+      $vocabulary = $field_info['settings']['allowed_values'][0]['vocabulary'];
+      $nids = db_select('taxonomy_index', 'ti');
+      $nids->distinct();
+      $nids->fields('ti', array('nid'));
+      $nids->join('taxonomy_term_data', 'td', 'td.tid = ti.tid');
+      $nids->join('taxonomy_vocabulary', 'tv', 'tv.vid = td.vid');
+      $nids->condition('tv.machine_name', $vocabulary);
+
+      // Rebuild possibly lost entries
+      foreach ($nids->execute() as $item) {
+        db_delete('taxonomy_index')->condition('nid', $item->nid)->execute();
+        $node = node_load($item->nid);
+        field_attach_update('node', $node);
+      }
+    }
+  }
+}
+
+/**
  * @} End of "defgroup taxonomy_index"
  */
diff --git a/core/modules/taxonomy/taxonomy.test b/core/modules/taxonomy/taxonomy.test
index 0ef4758..af7252e 100644
--- a/core/modules/taxonomy/taxonomy.test
+++ b/core/modules/taxonomy/taxonomy.test
@@ -1120,6 +1120,7 @@ class TaxonomyTermIndexTestCase extends TaxonomyWebTestCase {
     // Create terms in the vocabulary.
     $term_1 = $this->createTerm($this->vocabulary);
     $term_2 = $this->createTerm($this->vocabulary);
+    $term_3 = $this->createTerm($this->vocabulary);
 
     // Post an article.
     $edit = array();
@@ -1228,6 +1229,32 @@ class TaxonomyTermIndexTestCase extends TaxonomyWebTestCase {
       ':tid' => $term_2->tid,
     ))->fetchField();
     $this->assertEqual(0, $index_count, t('Term 2 is not indexed.'));
+
+    // Save terms 1 and 2 in the first field, and terms 2 and 3 in the second.
+    $update_node[$this->field_name_1][$langcode] = array(array('tid' => $term_1->tid), array('tid' => $term_2->tid));
+    $update_node[$this->field_name_2][$langcode] = array(array('tid' => $term_3->tid), array('tid' => $term_2->tid));
+    $updated_node = (object) $update_node;
+    node_save($updated_node);
+
+    // Delete the field 2 instance.
+    field_delete_instance($this->instance_2);
+
+    // The node should be tagged with terms 1 and 2, but not term 3.
+    $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array(
+      ':nid' => $node->nid,
+      ':tid' => $term_1->tid,
+    ))->fetchField();
+    $this->assertEqual(1, $index_count, 'Term 1 is indexed.');
+    $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array(
+      ':nid' => $node->nid,
+      ':tid' => $term_2->tid,
+    ))->fetchField();
+    $this->assertEqual(1, $index_count, 'Term 2 is indexed.');
+    $index_count = db_query('SELECT COUNT(*) FROM {taxonomy_index} WHERE nid = :nid AND tid = :tid', array(
+      ':nid' => $node->nid,
+      ':tid' => $term_3->tid,
+    ))->fetchField();
+    $this->assertEqual(0, $index_count, 'Term 3 is not indexed.');
   }
 
   /**
