fix nested type resolving for inherited types