         
         // 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();
             factory.prototype = null;

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

            if (addedParentStyleToProtoChain)
            {
                // There are parent styles so create an empty node.
                emptyObjectFactory.prototype = chain;
                chain = new emptyObjectFactory();
                emptyObjectFactory.prototype = null;
