Use the correct model type when generating the full generic template class name

All the tests pass and the correct name seems to be generated for C# templates at least.

I haven't checked VB templates as we weren't defaulting the model type to dynamic for that code path.