Resolve prefix when resolving typedef

When resolving typedef, we split prefix and base. We resolve base but not prefix.
For example A::B::C here C is the base and A::B is the prefix

if A::B is a typedef to D, then the resolution is false, No typedef will be found a A::B::C will stay A::B::C. We need to resolve A::B.
Then A::B::C will be resolved to D::C