Fixed problem with templates shadowing.
I wonder if we could reuse template parameters of the outer class.