diff --git a/lib/Drupal/views/ViewExecutable.php b/lib/Drupal/views/ViewExecutable.php
index 36aaee8..1157701 100644
--- a/lib/Drupal/views/ViewExecutable.php
+++ b/lib/Drupal/views/ViewExecutable.php
@@ -2050,13 +2050,14 @@ class ViewExecutable {
     // If the desired type is not found, use the original value directly.
     $handler_type = !empty($types[$type]['type']) ? $types[$type]['type'] : $type;
 
-    // @todo This variable is never used.
-    $handler = views_get_handler($table, $field, $handler_type);
+    $data = views_fetch_data($table, FALSE);
+    $plugin_id = $data[$field][$handler_type]['id'];
 
     $fields[$id] = array(
       'id' => $id,
       'table' => $table,
       'field' => $field,
+      'plugin_id' => $plugin_id
     ) + $options;
 
     $this->displayHandlers[$display_id]->setOption($types[$type]['plural'], $fields);
