diff --git a/core/modules/taxonomy/src/Form/OverviewTerms.php b/core/modules/taxonomy/src/Form/OverviewTerms.php
index 712db91..b15178a 100644
--- a/core/modules/taxonomy/src/Form/OverviewTerms.php
+++ b/core/modules/taxonomy/src/Form/OverviewTerms.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\taxonomy\Form;
 
+use Drupal\Component\Utility\SortArray;
 use Drupal\Core\Entity\EntityManagerInterface;
 use Drupal\Core\Form\FormBase;
 use Drupal\Core\Extension\ModuleHandlerInterface;
@@ -382,8 +383,25 @@ public function buildForm(array $form, FormStateInterface $form_state, Vocabular
    *   The current state of the form.
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
-    // Sort term order based on weight.
-    uasort($form_state->getValue('terms'), array('Drupal\Component\Utility\SortArray', 'sortByWeightElement'));
+    // Mark each term with the current order in which they are displayed in the
+    // form.
+    $current_order = 0;
+    $values = $form_state->getValues('terms');
+    foreach ($values as $tid => &$value) {
+      if (isset($form[$tid]['#term'])) {
+        $value->setValue('current_order', $current_order++);
+      }
+    }
+
+    // Sort terms, first on weight, second on the current order.
+    uasort($values, function ($a, $b) {
+      // If the terms have different weights, sort by weight.
+      if ($result = SortArray::sortByWeightElement((array) $a, (array) $b)) {
+        return $result;
+      }
+      // If the weights are identical, sort by the current order.
+      return SortArray::sortByKeyInt($a, $b, 'current_order');
+    });
 
     $vocabulary = $form_state->get(['taxonomy', 'vocabulary']);
     // Update the current hierarchy type as we go.
diff --git a/core/modules/taxonomy/src/Tests/TermTest.php b/core/modules/taxonomy/src/Tests/TermTest.php
index 49c711f..04d78bf 100644
--- a/core/modules/taxonomy/src/Tests/TermTest.php
+++ b/core/modules/taxonomy/src/Tests/TermTest.php
@@ -397,9 +397,9 @@ function testTermReorder() {
 
     \Drupal::entityManager()->getStorage('taxonomy_term')->resetCache();
     $terms = taxonomy_get_tree($this->vocabulary->id());
-    $this->assertEqual($terms[0]->tid, $term2->id(), 'Term 2 was moved above term 1.');
-    $this->assertEqual($terms[1]->parents, array($term2->id()), 'Term 3 was made a child of term 2.');
-    $this->assertEqual($terms[2]->tid, $term1->id(), 'Term 1 was moved below term 2.');
+    $this->assertEqual($terms[0]->tid, $term1->id(), 'Term 1 was moved above term 2.');
+    $this->assertEqual($terms[1]->tid, $term2->id(), 'Term 2 was moved below term 1.');
+    $this->assertEqual($terms[2]->parents, array($term2->id()), 'Term 3 was made a child of term 2.');
 
     $this->drupalPostForm('admin/structure/taxonomy/manage/' . $this->vocabulary->id() . '/overview', array(), t('Reset to alphabetical'));
     // Submit confirmation form.
