 
         if (filterMap)
         {
-            if (nodeAddedToChain)
-            {
-            
-                var filteredChain:Object = {};
-                // Create an object on the head of the chain using the original chain       
-                var filterObjectFactory:Function = function():void
-                {
-                };
-                filterObjectFactory.prototype = originalChain;
-                filteredChain = new filterObjectFactory();
-                
-                for (var i:String in chain)
-                {
-                    if (filterMap[i] != null)
-                    {
-                        filteredChain[filterMap[i]] = chain[i];
-                    }
-                } 
-                
-                chain = filteredChain;
-                chain[FILTERMAP_PROP] = filterMap;
-            }
+            if (factory != null || overrides)
+                chain = applyFilter(originalChain, chain, filterMap);
             else
-            {
                 chain = originalChain;
-            }
-        }
-
-        if (nodeAddedToChain)
-            clones[chain] = 1;
-
+        }
+        
+        if (factory != null || overrides)
+            clones[chain] = 1;    
+        
         return chain;
     }
 
+    
+    /**
+     *  @private
+     */
+    mx_internal function applyFilter(originalChain:Object, chain:Object, filterMap:Object):Object
+    {
+        var filteredChain:Object = {};
+        // Create an object on the head of the chain using the original chain       
+        var filterObjectFactory:Function = function():void
+        {
+        };
+        filterObjectFactory.prototype = originalChain;
+        filteredChain = new filterObjectFactory();
+        
+        for (var i:String in chain)
+        {
+            if (filterMap[i] != null)
+            {
+                filteredChain[filterMap[i]] = chain[i];
+            }
+        } 
+        
+        chain = filteredChain;
+        chain[FILTERMAP_PROP] = filterMap;
+
+        return chain;
+    }
+    
     /**
      *  @private
      */

        var nodeAddedToChain:Boolean = false;
        var originalChain:Object = chain;
        
        if (filterMap)
        {
            chain = {};
        }
        
        // Add parent style to proto chain.
        // If a styleManger parent does not have a style for a given selector,
        // then skip that parent and move up to the next parent.
        var styleParent:IStyleManager2 = styleManager.parent;
        while (styleParent)
        {
            var parentStyle:CSSStyleDeclaration = styleParent.getStyleDeclaration(selectorString);
            if (parentStyle)
            {
                chain = parentStyle.addStyleToProtoChain(chain, target, filterMap);
                break;
            }
            styleParent = styleParent.parent;
        }
        
        // If there's a defaultFactory for this style sheet,
        // then add the object it produces to the chain.
        if (defaultFactory != null)
        {
            defaultFactory.prototype = chain;
            chain = new defaultFactory();
            nodeAddedToChain = true;
        }

        // If there's a factory for this style sheet,
        // then add the object it produces to the chain.
        var objectFactory:Object = null;
        if (factory != null)
        {
            objectFactory = new factory();
            factory.prototype = chain;
            chain = new factory();
            nodeAddedToChain = true;
        }
        
        // If someone has called setStyle() on this CSSStyleDeclaration,
        // then some of the values returned from the factory are
        // out-of-date. Overwrite them with the up-to-date values.
        if (overrides)
        {
            // Before we add our overrides to the object at the head of
            // the chain, make sure that we added an object at the head
            // of the chain.
            if (defaultFactory == null && factory == null)
            {
                var emptyObjectFactory:Function = function():void
                {
                };
                emptyObjectFactory.prototype = chain;
                chain = new emptyObjectFactory();
                nodeAddedToChain = true;
            }

            for (var p:String in overrides)
            {
                if (overrides[p] === undefined)


    /**
     *  @private
     * 
     *  The order of nodes in the prototype chain:
     * 
     *  1. parent style default factories
     *  2. this default factory
     *  3. parent style factories
     *  4. parent style overrides
     *  5. this factory
     *  6. this overrides
     * 
     *  Where a parent style is a style with the same selector as this
     *  style but in a parent style manager. 
     * 
     */
    mx_internal function addStyleToProtoChain(chain:Object,
                                         target:DisplayObject,
