         
         // TODO (rfrishbe): need to check for DisplayObject?
         if (item is IVisualElement)
-            host = IVisualElement(item).parent; 
+        {
+            host = IVisualElement(item).parent;
+        } 
         else if (item is DisplayObject)
             host = DisplayObject(item).parent;
         

            myItemRenderer = createRendererForItem(item, index);
        }
        
        registerRenderer(index, myItemRenderer);
        
        if (myItemRenderer is GraphicElement)

                return child;
            }
            else        
                child.parent.removeChild(child);        
        }

        if ((_layeringFlags & LAYERING_ENABLED) || 
        	(item is IVisualElement && (item as IVisualElement).layer != 0))
        	invalidateLayering();
            
        return super.addChildAt(child, index != -1 ? index : super.numChildren);
    }
