fix Issue 9946 - A UFCS disallowed in dynamic array allocation

`TypeQualified::idents` may have both `Identifier` and `TemplateInstance` objects. It should be treated correctly, as like as `Dsymbol::searchX` and `TypeQualified::resolveHelper`.
Merge pull request #1934 from 9rnsr/fix9946

Issue 9946 - A UFCS disallowed in dynamic array allocation