Fix diagnostic message for member function pointer mismatches where one of the
classes is a template argument.