TypeFactory change to improve behavior when types cannot be resolved from the DependencyResolver