Add testcase for nested inner class deriving from a templated base class and defined outside of the outer class.

For languages that don't support nested class support, use flatnested.
See issue #270