         // set the _layoutFeatures.mirror flag.  Similarly, if mirroring isn't 
         // required, then clear the _layoutFeatures.mirror flag.
         
-        const mirror:Boolean = (systemManager && (systemManager.document == this)) 
-            ? (thisLayoutDirection != "ltr")  // we're the Application, parent is null
-            : (parentElt && (parentElt.layoutDirection != thisLayoutDirection));
+        const mirror:Boolean = (parentElt) 
+            ? (parentElt.layoutDirection != thisLayoutDirection)
+            : ("ltr" != thisLayoutDirection);
         
         if ((_layoutFeatures) ? (mirror != _layoutFeatures.mirror) : mirror)
         {

            _layoutFeatures.mirror = mirror;
            invalidateTransform();
        }
      
        //  If this is a leaf node, then we're done.  If not, the styleChanged() machinery
        //  (via commitProperties()) will deal with UIComponent children.   We have to 
        //  deal with IVisualElement children that don't support styles, like 
        //  GraphicElements, here.

        if (!(this is IVisualElementContainer))
            return;
        

                if (sm.isProxy || (sm == systemManager.topLevelSystemManager &&
                    sm.document != this))
                {
                    // Size ourself to the new measured width/height   This can
                    // cause the _layoutFeatures computed matrix to become invalid 
                    setActualSize(getExplicitOrMeasuredWidth(),
                                  getExplicitOrMeasuredHeight());
                }
            }
            
            // Don't validate transform.matrix until after setting actual size
            validateMatrix();

            var unscaledWidth:Number = width;
            var unscaledHeight:Number = height;
