diff --git a/modules/simpletest/tests/form.test b/modules/simpletest/tests/form.test
index da08547..8a1c91d 100644
--- a/modules/simpletest/tests/form.test
+++ b/modules/simpletest/tests/form.test
@@ -1113,6 +1113,12 @@ class FormsElementsVerticalTabsFunctionalTest extends DrupalWebTestCase {
     $this->drupalGet('form_test/vertical-tabs-3');
     $tab2 = $this->xpath("//div[@class='vertical-tabs-panes']/fieldset[@id='edit-tab2']");
     $this->assertTrue(isset($tab2[0]), 'Child with #group found.');
+
+    // Tests that we can see fieldsets which are BOTH child elements of the
+    // vertical_tabs form element AND have a #group set, but not a #weight.
+    $this->drupalGet('form_test/vertical-tabs-4');
+    $tab2 = $this->xpath("//div[@class='vertical-tabs-panes']/fieldset[@id='edit-tab2']");
+    $this->assertTrue(isset($tab2[0]), 'Child with #group found.');
   }
 }
 
diff --git a/modules/simpletest/tests/form_test.module b/modules/simpletest/tests/form_test.module
index c7f8c11..501b97a 100644
--- a/modules/simpletest/tests/form_test.module
+++ b/modules/simpletest/tests/form_test.module
@@ -98,6 +98,14 @@ function form_test_menu() {
     'type' => MENU_CALLBACK,
   );
 
+  $items['form_test/vertical-tabs-4'] = array(
+    'title' => 'Vertical tabs tests',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('_form_test_vertical_tabs_4_form'),
+    'access arguments' => array('access content'),
+    'type' => MENU_CALLBACK,
+  );
+
   $items['form_test/form-storage'] = array(
     'title' => 'Form storage test',
     'page callback' => 'drupal_get_form',
@@ -792,6 +800,38 @@ function _form_test_vertical_tabs_3_form($form, &$form_state) {
 }
 
 /**
+ * Tests functionality of vertical tabs - children with an explicit #group.
+ */
+function _form_test_vertical_tabs_4_form($form, &$form_state) {
+  $form['vertical_tabs'] = array(
+    '#type' => 'vertical_tabs',
+  );
+  $form['vertical_tabs']['tab1'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Tab 1'),
+    '#collapsible' => TRUE,
+    '#access' => user_access('access vertical_tab_test tabs'),
+    '#group' => 'vertical_tabs',
+  );
+  $form['vertical_tabs']['tab1']['field1'] = array(
+    '#title' => t('Field 1'),
+    '#type' => 'textfield',
+  );
+  $form['vertical_tabs']['tab2'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Tab 2'),
+    '#collapsible' => TRUE,
+    '#access' => user_access('access vertical_tab_test tabs'),
+    '#group' => 'vertical_tabs',
+  );
+  $form['vertical_tabs']['tab2']['field2'] = array(
+    '#title' => t('Field 2'),
+    '#type' => 'textfield',
+  );
+  return $form;
+}
+
+/**
  * A multistep form for testing the form storage.
  *
  * It uses two steps for editing a virtual "thing". Any changes to it are saved
