diff --git includes/view.inc includes/view.inc
index d90f3bf..ad686c2 100644
--- includes/view.inc
+++ includes/view.inc
@@ -1472,24 +1472,49 @@ class view extends views_db_object {
         continue;
       }
 
-      foreach ($display->handler->option_definition() as $option => $definition) {
+      $exported_options = array();
+      $option_definitions = $display->handler->option_definition();
+
+      foreach ($option_definitions as $option => $definition) {
         // Special handling for some items
         switch ($option) {
           case 'defaults':
             // skip these
             break;
           default:
-            if (!$display->handler->is_defaulted($option)) {
-              $value = $display->handler->get_option($option);
-              if ($id == 'default') {
-                $default = isset($definition['default']) ? $definition['default'] : NULL;
-              }
-              else {
-                $default = $this->display['default']->handler->get_option($option);
+            if (!in_array($option, $exported_options) && !$display->handler->is_defaulted_group($option)) {
+              $defaultable_sections = $display->handler->defaultable_sections();
+
+              $overriden = FALSE;
+              $option_section = FALSE;
+              $options = array($option);
+
+              if (!isset($defaultable_sections[$option])) {
+                foreach ($defaultable_sections as $section => $members) {
+                  if (in_array($option, $members)) {
+                    $option_section = $section;
+                    $options = array_diff($members, array($section));
+                    $options[] = $section;
+                    break;
+                  }
+                }
               }
 
-              if ($value !== $default) {
-                $output .= $indent . '$handler->override_option(\'' . $option . '\', ' . views_var_export($value, $indent) . ");\n";
+              foreach ($options as $option) {
+                if (!in_array($option, $exported_options)) {
+                  $value = $display->handler->get_option($option);
+                  if ($id == 'default') {
+                    $default = isset($option_definitions[$option]['default']) ? $option_definitions[$option]['default'] : NULL;
+                  }
+                  else {
+                    $default = $this->display['default']->handler->get_option($option);
+                  }
+                  if (($overriden && $option_section == $option) || $value !== $default  || $id == 'default') {
+                    $exported_options[] = $option;
+                    $overriden = TRUE;
+                    $output .= $indent . '$handler->override_option(\'' . $option . '\', ' . views_var_export($value, $indent) . ");\n";
+                  }
+                }
               }
             }
         }
diff --git plugins/views_plugin_display.inc plugins/views_plugin_display.inc
index 489f2da..0229e6c 100644
--- plugins/views_plugin_display.inc
+++ plugins/views_plugin_display.inc
@@ -470,6 +470,23 @@ class views_plugin_display extends views_plugin {
    * @return
    *   TRUE for the default display
    */
+  function is_defaulted_group($option) {
+    $defaultable_sections = $this->defaultable_sections();
+    if(isset($defaultable_sections[$option])) {
+      $defaulted = TRUE;
+      foreach($defaultable_sections[$option] as $value) {
+        if(!$this->is_defaulted($value)) {
+          $defaulted = FALSE;
+          break;
+        }
+      }
+      return $defaulted;
+    }
+    else {
+      return $this->is_defaulted($option);
+    }
+  }
+
   function is_defaulted($option) {
     return !$this->is_default_display() && !empty($this->default_display) && !empty($this->options['defaults'][$option]);
   }
