Fix the fix for handling of partially specialized class template.

The previous implementation assume (wrongly) that if there was less template parameters
than template argument then the argument fixed in the specialization where upfront.

I.e. it was supporting
template <typename T1, typename T2, typename T3> struct B;
template <typename T4, typename T5> struct B<void, T4, T5>;

but did not support

template <typename T4, typename T5> struct B<T4, void, T5>;
template <typename T4, typename T5> struct B<T4, T5, void>;

This correct commit 50304a4aaa23e217e8211ecb0acb3b2c3cd10f01 which was solving ROOT-6019.