Ensure errors are thrown when types that are redeclared are used as types
Instead of using inspect, use a custom tokenfunc to track the lookahead token