The type alias template is not diagnosed when instantiate an expected non-type template under dependent scope, causing ICE.
Besides that, the diagnostic message has been updated to account for the fact that the function template is not the only non-type template.
Fixes #62533