      */
     public function setLayoutMatrix(value:Matrix, invalidateLayout:Boolean):void
     {
+        // validateMatrix when switching between 2D/3D, works around player bug
+        // see sdk-23421 
+        var was3D:Boolean = is3D;
+
         _hasComplexLayoutMatrix = true;
         if (_layoutFeatures == null)
         {

    {
        if (scaleZ == value)
            return;
        if (_layoutFeatures == null)
            initAdvancedLayoutFeatures();


        if (rotationY == value)
            return;

        // validateMatrix when switching between 2D/3D, works around player bug
        // see sdk-23421 
        var was3D:Boolean = is3D;
        if (_layoutFeatures == null)
            initAdvancedLayoutFeatures();
        _layoutFeatures.layoutRotationY = value;
        invalidateTransform();
        invalidateProperties();
        invalidateParentSizeAndDisplayList();
        if (was3D != is3D)
            validateMatrix();
    }
                                
    //----------------------------------
