fix generation of templated, inheritated cppclass