Handle template type variable declarations inside templates