diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTermIndentationTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTermIndentationTest.php
index 59970c4..7453e99 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTermIndentationTest.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTermIndentationTest.php
@@ -54,7 +54,18 @@ function testTermIndentation() {
     // Submit the edited form and check for HTML indentation element presence.
     $this->drupalPost('admin/structure/taxonomy/manage/' . $this->vocabulary->get('vid'), $edit, t('Save'));
     $this->assertPattern('|<div class="indentation">&nbsp;</div>|');
+
+    // Move the second term back out to the root level.
+    $edit = array(
+      'terms[tid:' . $term2->id() . ':0][term][tid]' => 2,
+      'terms[tid:' . $term2->id() . ':0][term][parent]' => '',
+      'terms[tid:' . $term2->id() . ':0][term][depth]' => 0,
+      'terms[tid:' . $term2->id() . ':0][weight]' => 1,
+    );
+
+    $this->drupalPost('admin/structure/taxonomy/manage/' . $this->vocabulary->get('vid'), $edit, t('Save'));
+    // All terms back at the root level, no identation should be present.
+    $this->assertNoPattern('|<div class="indentation">&nbsp;</div>|');
   }
 
 }
-
