fix Issue 11518 - DMD segfault on multiple template match

Incomplete `specType`, like as (T : A!T), should not be used during determination of template partial specialization order.
Merge pull request #2769 from 9rnsr/fix11518

Issue 11518 - DMD segfault on multiple template match