         else if (type is Class)
         {
             _class = Class(type);
-            _factory = new ContextualClassFactory(Class(type));
+            _factory = new ContextualClassFactory(Class(type), moduleFactory);
         }
 
         _insertPosition = insertPosition;

     *  @productversion Flex 3
     */
    public function InstanceCache(type:Object, parent:Object = null,
                                  insertPosition:int = -1)
    {
        super();


import mx.core.ClassFactory;
import mx.core.ContextualClassFactory;
import mx.core.IFactory;
import mx.core.IFlexModuleFactory;
import mx.core.IUITextField;

/**
