                 currentModuleFactory = moduleFactory;
                 while (currentModuleFactory != topLevelModuleFactory)
                 {
-                    var request:Request = new Request(Request.GET_PARENT_FLEX_MODULE_FACTORY_REQUEST);
-                    DisplayObject(currentModuleFactory).dispatchEvent(request); 
-                    currentModuleFactory = request.value as IFlexModuleFactory;
+
+                    currentModuleFactory = getParentModuleFactory(currentModuleFactory);
                     
                     // If we couldn't get the parent module factory, then we 
                     // will have to load into the highest application domain

                    }
                } 

                // Resolve the application domain target.
                // If the curent module factory is the rsl owning module
                // factory, then don't try to resolve the app domain 
                // target because the only choice left is "current" 
                // since this the last module factory we are checking
                // and "current" is the default if no module factory
                // is specified.
                if (!loaded[rsl] && resolved[rsl] == null && 
                    (currentModuleFactory == moduleFactory || 
                    resolveApplicationDomainTarget(rsl,
                                                   moduleFactory,
                                                   currentModuleFactory,
                                                   parentModuleFactory,
                                                   topLevelModuleFactory)))
                {
                    resolved[rsl] = 1;
                    resolvedLength++;                        
                }
            }
            


    /**
     *  @private
     *  Get the parent module factory. 
     * 
     *  @param moduleFactory The module factory to get the parent of.
     * 
     *  @return the parent module factory if available, null otherwise. 
     */
    private static function getParentModuleFactory(moduleFactory:IFlexModuleFactory):IFlexModuleFactory    
    {
        var request:Request = new Request(Request.GET_PARENT_FLEX_MODULE_FACTORY_REQUEST);
        DisplayObject(moduleFactory).dispatchEvent(request); 
        return request.value as IFlexModuleFactory;
    }
    
    /**
     *  @private
     *  Resolve the application domain target. 
     * 
     *  @param rsl to resolve.
