Fixed little bug in resolver.
It incorrectly resolved internal types sometimes.