This patch refines the matching of the relevant optional types to anchor on the
global namespace. Previously, we could match anything with the right name
(e.g. base::Optional) even if nested within other namespaces. This over
matching resulted in an assertion violation when _different_ base::Optional
was encountered nested inside another namespace.
Fixes issue #57036.
Why do we need two places to define what is an optional type? Would it be possible to somehow reuse the Declaration matcher on the RecordDecel here? Or would that be bad for performance?