diff --git modules/taxonomy/taxonomy.admin.inc modules/taxonomy/taxonomy.admin.inc
index a509c9a..4856cee 100644
--- modules/taxonomy/taxonomy.admin.inc
+++ modules/taxonomy/taxonomy.admin.inc
@@ -163,6 +163,10 @@ function taxonomy_form_vocabulary($form, &$form_state, $edit = array()) {
       'js' => array(drupal_get_path('module', 'system') . '/system.js', $js_settings),
     ),
   );
+  $form['old_machine_name'] = array(
+    '#type' => 'value',
+    '#value' => $vocabulary->machine_name,
+  );
   $form['description'] = array(
     '#type' => 'textfield',
     '#title' => t('Description'),
@@ -223,12 +227,10 @@ function taxonomy_form_vocabulary_submit($form, &$form_state) {
     $form_state['confirm_delete'] = TRUE;
     return;
   }
-  $old_machine_name = $form_state['vocabulary']->machine_name;
+
   $vocabulary = $form_state['vocabulary'];
   entity_form_submit_build_entity('taxonomy_vocabulary', $vocabulary, $form, $form_state);
-  if ($vocabulary->machine_name != $old_machine_name) {
-    field_attach_rename_bundle('taxonomy_term', $old_machine_name, $vocabulary->machine_name);
-  }
+
   switch (taxonomy_vocabulary_save($vocabulary)) {
     case SAVED_NEW:
       drupal_set_message(t('Created new vocabulary %name.', array('%name' => $vocabulary->name)));
diff --git modules/taxonomy/taxonomy.module modules/taxonomy/taxonomy.module
index de8ed2d..3274620 100644
--- modules/taxonomy/taxonomy.module
+++ modules/taxonomy/taxonomy.module
@@ -374,11 +374,14 @@ function taxonomy_admin_vocabulary_title_callback($vocabulary) {
  * Save a vocabulary given a vocabulary object.
  */
 function taxonomy_vocabulary_save($vocabulary) {
-
+  // Prevent leading and trailing spaces in vocabulary names.
   if (!empty($vocabulary->name)) {
-    // Prevent leading and trailing spaces in vocabulary names.
     $vocabulary->name = trim($vocabulary->name);
   }
+  // For existing vocabularies, make sure we can detect machine name changes.
+  if (!empty($vocabulary->vid) && !isset($vocabulary->old_machine_name)) {
+    $vocabulary->old_machine_name = db_query("SELECT machine_name FROM {taxonomy_vocabulary} WHERE vid = :vid", array(':vid' => $vocabulary->vid))->fetchField();
+  }
 
   if (!isset($vocabulary->module)) {
     $vocabulary->module = 'taxonomy';
@@ -388,6 +391,9 @@ function taxonomy_vocabulary_save($vocabulary) {
 
   if (!empty($vocabulary->vid) && !empty($vocabulary->name)) {
     $status = drupal_write_record('taxonomy_vocabulary', $vocabulary, 'vid');
+    if ($vocabulary->old_machine_name != $vocabulary->machine_name) {
+      field_attach_rename_bundle('taxonomy_term', $vocabulary->old_machine_name, $vocabulary->machine_name);
+    }
     module_invoke_all('taxonomy_vocabulary_update', $vocabulary);
     module_invoke_all('entity_update', $vocabulary, 'taxonomy_vocabulary');
   }
@@ -434,6 +440,31 @@ function taxonomy_vocabulary_delete($vid) {
 }
 
 /**
+ * Implements hook_taxonomy_vocabulary_update().
+ */
+function taxonomy_taxonomy_vocabulary_update($vocabulary) {
+  // Reflect machine name changes in the definitions of existing 'taxonomy'
+  // fields.
+  if (!empty($vocabulary->old_machine_name) && $vocabulary->old_machine_name != $vocabulary->machine_name) {
+    $fields = field_read_fields();
+    foreach ($fields as $field_name => $field) {
+      $update = FALSE;
+      if ($field['type'] == 'taxonomy_term_reference') {
+        foreach ($field['settings']['allowed_values'] as $key => &$value) {
+          if ($value['vocabulary'] == $vocabulary->old_machine_name) {
+            $value['vocabulary'] = $vocabulary->machine_name;
+            $update = TRUE;
+          }
+        }
+        if ($update) {
+          field_update_field($field);
+        }
+      }
+    }
+  }
+}
+
+/**
  * Dynamically check and update the hierarchy flag of a vocabulary.
  *
  * Checks the current parents of all terms in a vocabulary and updates the
diff --git modules/taxonomy/taxonomy.test modules/taxonomy/taxonomy.test
index f530c6f..16c410b 100644
--- modules/taxonomy/taxonomy.test
+++ modules/taxonomy/taxonomy.test
@@ -192,7 +192,7 @@ class TaxonomyVocabularyUnitTest extends TaxonomyWebTestCase {
   }
 
   function setUp() {
-    parent::setUp('taxonomy');
+    parent::setUp('taxonomy', 'field_test');
     $admin_user = $this->drupalCreateUser(array('create article content', 'administer taxonomy'));
     $this->drupalLogin($admin_user);
     $this->vocabulary = $this->createVocabulary();
@@ -325,6 +325,32 @@ class TaxonomyVocabularyUnitTest extends TaxonomyWebTestCase {
     // Fetch vocabulary 1 by name and ID.
     $this->assertTrue(current(taxonomy_vocabulary_load_multiple(array($vocabulary1->vid), array('name' => $vocabulary1->name)))->vid == $vocabulary1->vid, t('Vocabulary loaded successfully by name and ID.'));
   }
+
+  /**
+   * Tests that machine name changes are properly reflected.
+   */
+  function testTaxonomyVocabularyChangeMachineName() {
+    // Add a field instance to the vocabulary.
+    $field = array(
+      'field_name' => 'field_test',
+      'type' => 'test_field',
+    );
+    field_create_field($field);
+    $instance = array(
+      'field_name' => 'field_test',
+      'entity_type' => 'taxonomy_term',
+      'bundle' => $this->vocabulary->machine_name,
+    );
+    field_create_instance($instance);
+
+    // Change the machine name.
+    $new_name = drupal_strtolower($this->randomName());
+    $this->vocabulary->machine_name = $new_name;
+    taxonomy_vocabulary_save($this->vocabulary);
+
+    // Check that the field instance is still attached to the vocabulary.
+    $this->assertTrue(field_info_instance('taxonomy_term', 'field_test', $new_name), t('The bundle name was updated correctly.'));
+  }
 }
 
 /**
@@ -586,7 +612,7 @@ class TaxonomyTermTestCase extends TaxonomyWebTestCase {
     $term->description = '';
     taxonomy_term_save($term);
     $this->drupalGet('taxonomy/term/' . $term->tid);
-    $this->assertNoPattern('|class="term-listing-heading"|', 'Term page did not display the term description when description was blank.');    
+    $this->assertNoPattern('|class="term-listing-heading"|', 'Term page did not display the term description when description was blank.');
 
     // Check that the term feed page is working.
     $this->drupalGet('taxonomy/term/' . $term->tid . '/feed');
@@ -830,15 +856,9 @@ class TaxonomyTermFieldTestCase extends TaxonomyWebTestCase {
     $web_user = $this->drupalCreateUser(array('access field_test content', 'administer field_test content', 'administer taxonomy'));
     $this->drupalLogin($web_user);
     $this->vocabulary = $this->createVocabulary();
-  }
 
-  /**
-   * Test term field validation.
-   */
-  function testTaxonomyTermFieldValidation() {
+    // Setup a field and instance.
     $this->field_name = drupal_strtolower($this->randomName());
-
-    // Create a field with settings to validate.
     $this->field = array(
       'field_name' => $this->field_name,
       'type' => 'taxonomy_term_reference',
@@ -866,7 +886,12 @@ class TaxonomyTermFieldTestCase extends TaxonomyWebTestCase {
       ),
     );
     field_create_instance($this->instance);
+  }
 
+  /**
+   * Test term field validation.
+   */
+  function testTaxonomyTermFieldValidation() {
     // Test valid and invalid values with field_attach_validate().
     $langcode = LANGUAGE_NONE;
     $entity = field_test_create_stub_entity();
@@ -896,38 +921,6 @@ class TaxonomyTermFieldTestCase extends TaxonomyWebTestCase {
    * Test widgets.
    */
   function testTaxonomyTermFieldWidgets() {
-    // Setup a field and instance.
-    $entity_type = 'test_entity';
-    $this->field_name = drupal_strtolower($this->randomName());
-    $this->field = array(
-      'field_name' => $this->field_name,
-      'type' => 'taxonomy_term_reference',
-      'settings' => array(
-        'allowed_values' => array(
-          array(
-            'vocabulary' => $this->vocabulary->machine_name,
-            'parent' => '0',
-          ),
-        ),
-      )
-    );
-    field_create_field($this->field);
-    $this->instance = array(
-      'field_name' => $this->field_name,
-      'entity_type' => 'test_entity',
-      'bundle' => 'test_bundle',
-      'label' => $this->randomName() . '_label',
-      'widget' => array(
-        'type' => 'options_select',
-      ),
-      'display' => array(
-        'full' => array(
-          'type' => 'taxonomy_term_reference_link',
-        ),
-      ),
-    );
-    field_create_instance($this->instance);
-
     // Create a term in the vocabulary.
     $term = $this->createTerm($this->vocabulary);
 
@@ -948,11 +941,45 @@ class TaxonomyTermFieldTestCase extends TaxonomyWebTestCase {
     // Display the object.
     $entity = field_test_entity_test_load($id);
     $entities = array($id => $entity);
-    field_attach_prepare_view($entity_type, $entities, 'full');
-    $entity->content = field_attach_view($entity_type, $entity, 'full');
+    field_attach_prepare_view('test_entity', $entities, 'full');
+    $entity->content = field_attach_view('test_entity', $entity, 'full');
     $this->content = drupal_render($entity->content);
     $this->assertText($term->name, t('Term name is displayed'));
   }
+
+  /**
+   * Tests that vocabulary machine name changes are mirrored in field definitions.
+   */
+  function testTaxonomyTermFieldChangeMachineName() {
+    // Add several entries in the 'allowed_values' setting, to make sure that
+    // they all get updated.
+    $this->field['settings']['allowed_values'] = array(
+      array(
+        'vocabulary' => $this->vocabulary->machine_name,
+        'parent' => '0',
+      ),
+      array(
+        'vocabulary' => $this->vocabulary->machine_name,
+        'parent' => '0',
+      ),
+      array(
+        'vocabulary' => 'foo',
+        'parent' => '0',
+      ),
+    );
+    field_update_field($this->field);
+    // Change the machine name.
+    $new_name = drupal_strtolower($this->randomName());
+    $this->vocabulary->machine_name = $new_name;
+    taxonomy_vocabulary_save($this->vocabulary);
+
+    // Check that the field instance is still attached to the vocabulary.
+    $field = field_info_field($this->field_name);
+    $allowed_values = $field['settings']['allowed_values'];
+    $this->assertEqual($allowed_values[0]['vocabulary'], $new_name, t('Index 0: Machine name was updated correctly.'));
+    $this->assertEqual($allowed_values[1]['vocabulary'], $new_name, t('Index 1: Machine name was updated correctly.'));
+    $this->assertEqual($allowed_values[2]['vocabulary'], 'foo', t('Index 2: Machine name was left untouched.'));
+  }
 }
 
 /**
@@ -1036,7 +1063,7 @@ class TaxonomyTokenReplaceTestCase extends TaxonomyWebTestCase {
     $tests['[term:node-count]'] = 0;
     $tests['[term:parent:name]'] = '[term:parent:name]';
     $tests['[term:vocabulary:name]'] = check_plain($this->vocabulary->name);
-    
+
     foreach ($tests as $input => $expected) {
       $output = token_replace($input, array('term' => $term1), array('language' => $language));
       $this->assertFalse(strcmp($output, $expected), t('Sanitized taxonomy term token %token replaced.', array('%token' => $input)));
