Fix to multiple level template inheritance?