diff --git a/core/lib/Drupal/Component/Graph/Graph.php b/core/lib/Drupal/Component/Graph/Graph.php
index 5d8d5ca..4d99047 100644
--- a/core/lib/Drupal/Component/Graph/Graph.php
+++ b/core/lib/Drupal/Component/Graph/Graph.php
@@ -111,7 +111,7 @@ protected function depthFirstSearch(&$state, $start, &$component = NULL) {
     $this->graph[$start]['paths'] = array();
 
     // Assign $start to the current component.
-    $this->graph[$start]['component'] = $component;
+    $this->graph[$start]['component'] = (string) $component;
     $state['components'][$component][] = $start;
 
     // Visit edges of $start.
@@ -125,7 +125,7 @@ protected function depthFirstSearch(&$state, $start, &$component = NULL) {
           // reassign all the previously explored vertices.
           $new_component = $this->graph[$end]['component'];
           foreach ($state['components'][$component] as $vertex) {
-            $this->graph[$vertex]['component'] = $new_component;
+            $this->graph[$vertex]['component'] = (string) $new_component;
             $state['components'][$new_component][] = $vertex;
           }
           unset($state['components'][$component]);
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();
