     {
         if (_layout == value)
             return;
-
-        if (value)
-        {
+        
+        if (_layout)
+        {
+            _layout.target = null;
+            _layout.removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE, redispatchLayoutEvent);
+
+            if (clipAndEnableScrollingExplicitlySet)
+            {
+                // when the layout changes, we don't want to transfer over 
+                // horizontalScrollPosition and verticalScrollPosition
+                _layoutProperties = {clipAndEnableScrolling: _layout.clipAndEnableScrolling};
+            }
+        }
+
+        _layout = value; 
+
+        if (_layout)
+        {
+            _layout.target = this;
+            _layout.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, redispatchLayoutEvent);
+
             if (_layoutProperties)
             {
                 if (_layoutProperties.clipAndEnableScrolling !== undefined)

    //----------------------------------
    //  clipAndEnableScrolling
    //----------------------------------
    
    /**
     *  @copy spark.core.IViewport#clipAndEnableScrolling

                
                _layoutProperties = null;
            }
        }

        invalidateSize();
