charj: fix subtree construction for templated class bodies