[Type checker] Validate not-yet-typed declarations we find via unqualified name lookup.
When using the ASTScope-based unqualified name lookup, we might find
things that are in scope but haven't been fully type-checked yet;
allow us to perform type checking.