         
         if (childParent == this)
         {
-            super.setChildIndex(child, childIndex - 1);
+            if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_5)
+            {
+                // test to see if we're truly parented
+                try
+                {
+                    var curIndex:int = getChildIndex(child)
+                }
+                catch (e:Error)
+                {
+                    curIndex = -1;
+                }
+                if (child == typicalLayoutElement && curIndex == -1)
+                {
+                    // we removed it from the display list but not
+                    // from the parent chain so it can be re-validated.
+                    // add it back
+                    $addChildAt(child, childIndex)
+                }
+                else
+                    super.setChildIndex(child, childIndex - 1);
+            }
+            else
+                super.setChildIndex(child, childIndex - 1);
             return;
         }
         

import flash.utils.getQualifiedClassName;

import mx.collections.IList;
import mx.core.IDataRenderer;
import mx.core.IFactory;
import mx.core.IInvalidating;
import mx.core.ILayoutElement;
import mx.core.IVisualElement;
import mx.core.mx_internal;
import mx.events.CollectionEvent;
import mx.events.CollectionEventKind;
import mx.events.PropertyChangeEvent;
import mx.utils.MatrixUtil;

import spark.components.supportClasses.GroupBase;

    {
        if (_typicalItem === value)
            return;
        if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_5)
        {
            if (_typicalItem)
            {
                if (layout && layout.typicalLayoutElement)
                {
                    // we already removed it from the display
                    // object tree in initializeTypicalElement
                    // so that it doesn't affect bounds
                    // calculations, but we left it in the
                    // styles and layout heirarchy.  Remove
                    // from those hierarchies now.
                    removingChild(DisplayObject(layout.typicalLayoutElement));
                    childRemoved(DisplayObject(layout.typicalLayoutElement));
                }
            }
        }
        _typicalItem = explicitTypicalItem = value;
        typicalItemChanged = true;
        invalidateProperties();
