cppbc: generator bugfix for templated method return values