diff --git a/includes/plugins.inc b/includes/plugins.inc
index 4b8c7f0..9e1301d 100644
--- a/includes/plugins.inc
+++ b/includes/plugins.inc
@@ -460,7 +460,13 @@ class views_plugin extends views_object {
   /**
    * Provide a form to edit options for this plugin.
    */
-  function options_form(&$form, &$form_state) { }
+  function options_form(&$form, &$form_state) {
+    // Some form elements belong in a fieldset for presentation, but can't
+    // be moved into one because of the form_state['values'] hierarchy. Those
+    // elements can add a #fieldset => 'fieldset_name' property, and they'll
+    // be moved to their fieldset during pre_render.
+    $form['#pre_render'][] = 'views_ui_pre_render_add_fieldset_markup';
+  }
 
   /**
    * Validate the options form.
diff --git a/plugins/views_plugin_query.inc b/plugins/views_plugin_query.inc
index 0d71c14..f661269 100644
--- a/plugins/views_plugin_query.inc
+++ b/plugins/views_plugin_query.inc
@@ -70,7 +70,9 @@ class views_plugin_query extends views_plugin {
   /**
    * Add settings for the ui.
    */
-  function options_form(&$form, &$form_state) { }
+  function options_form(&$form, &$form_state) {
+    parent::options_form($form, $form_state);
+  }
 
   function options_validate(&$form, &$form_state) { }
 
diff --git a/plugins/views_plugin_query_default.inc b/plugins/views_plugin_query_default.inc
index e99df14..a2f8a74 100644
--- a/plugins/views_plugin_query_default.inc
+++ b/plugins/views_plugin_query_default.inc
@@ -194,6 +194,8 @@ class views_plugin_query_default extends views_plugin_query {
    * Add settings for the ui.
    */
   function options_form(&$form, &$form_state) {
+    parent::options_form($form, $form_state);
+
     $form['disable_sql_rewrite'] = array(
       '#title' => t('Disable SQL rewriting'),
       '#description' => t('Disabling SQL rewriting will disable node_access checks as well as other modules that implement hook_query_alter().'),
