             }
             else
             {
-                removeChild(DisplayObject(lastChild));
+                super.removeChild(DisplayObject(lastChild));
             }       
             // Restore the original document. Otherwise, when we re-add the child when the Panel is
             // a custom component, the child will use the custom component as the document instead of

        {
            setControlBar(null);
        }
    }

    //--------------------------------------------------------------------------
    //
    //  Methods

    override public function createComponentsFromDescriptors(
                                recurse:Boolean = true):void
    {
        inCreateComponentsFromDescriptors = true;
        super.createComponentsFromDescriptors();
        
        if (numChildren == 0)
        {
            setControlBar(null);
            inCreateComponentsFromDescriptors = false;
            return;
        }
        
