In this testcase, instantiate_type resolves the overload, but the result is a pointer to the wrong class; we need to then try to convert it to the desired type in order to get the diagnostic we want. Tested x86_64-pc-linux-gnu, applying to trunk and 7.