fix resolveIdentifier for typeDeclarationBuilders
fix resolveIdentifier for typeDeclarationBuilders

I noticed the data class macro was failing when trying to resolve some identifiers that were for types, this appears to fix it although I am not 100% sure of the situation we were hitting here.

Change-Id: Ifdb580fecd2b3b7f87caceefd613c52e1d02bc92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234685
Auto-Submit: Jake Macdonald <28dccc213a1e50b0de348b9cb82c0229ef6b65f0@google.com>
Reviewed-by: Johnni Winther <0f64ef784d57ffb064b634040f9eeba0d33d0be4@google.com>
Commit-Queue: Johnni Winther <0f64ef784d57ffb064b634040f9eeba0d33d0be4@google.com>

dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk