 import mx.effects.Effect;
 import mx.effects.effectClasses.PropertyChanges;
 import mx.effects.effectClasses.RemoveChildActionInstance;
+import mx.core.IVisualElementContainer;
 
 use namespace mx_internal;
 

        var container:* = target.parent;
        if (property == "index")
            return container ? 
                (!(container is Group) ? container.getChildIndex(target) : container.getItemIndex(target)) : 0;
		
		return super.getValueFromTarget(target, property);
	}

            {
                // TODO : workaround for current situation of mis-match between
                // Group having 'item's and Flex3 components having 'parent's
                if (value is IVisualElementContainer)
                    IVisualElementContainer(value).addElementAt(target, Math.min(props.index, 
                        IVisualElementContainer(value).numElements));
                else
                    value.addChildAt(target, Math.min(props.index, 
                        value.numChildren));
