      */
     mx_internal function addInstance(instance:RadioButton):void
     {
-        instance.indexNumber = indexNumber++;
         instance.addEventListener(Event.REMOVED, radioButton_removedHandler);    
-        radioButtons.push(instance);
-
+        radioButtons.push(instance);    
+        
+        // Apply group indices in "breadth-first" order.
+        radioButtons.sort(breadthOrderCompare);
+        for (var i:int = 0; i < radioButtons.length; i++)
+            radioButtons[i].indexNumber = i;
+            
         if (_selectedValue != null)
             selectedValue = _selectedValue;
            

        }
    }
    
    //--------------------------------------------------------------------------
    //
    //  Event Handlers

     */
    private var radioButtons:Array /* of RadioButton */ = [];

    //--------------------------------------------------------------------------
    //
    //  Properties
