diff --git a/core/lib/Drupal/Component/Graph/Graph.php b/core/lib/Drupal/Component/Graph/Graph.php
index 5d8d5ca..d3076b4 100644
--- a/core/lib/Drupal/Component/Graph/Graph.php
+++ b/core/lib/Drupal/Component/Graph/Graph.php
@@ -81,6 +81,10 @@ public function searchAndSort() {
       $this->graph[$vertex]['weight'] = $component_weights[$component]--;
     }
 
+    // Copy the array.
+    $graph = $this->graph;
+    $this->graph = &$graph;
+
     return $this->graph;
   }
 
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index 15e6e80..32203ae 100755
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -104,6 +104,13 @@
 
 $test_list = simpletest_script_get_test_list();
 
+if (in_array('Drupal\comment\Tests\CommentFieldsTest', $test_list)) {
+  $test_list = ['Drupal\comment\Tests\CommentFieldsTest'];
+}
+else {
+  $test_list = [];
+}
+
 // Try to allocate unlimited time to run the tests.
 drupal_set_time_limit(0);
 simpletest_script_reporter_init();
