             // of the chain.
             if (factory == null)
             {
-                var emptyObjectFactory:Function = function():void
-                {
-                };
                 emptyObjectFactory.prototype = chain;
                 chain = new emptyObjectFactory();
                 emptyObjectFactory.prototype = null;

    {
        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();
        filterObjectFactory.prototype = null;
        
        for (var i:String in chain)
        {

        
        // If there's a factory for this style sheet,
        // then add the object it produces to the chain.
        if (factory != null)
        {
            factory.prototype = chain;
            chain = new factory();
            factory.prototype = null;
