Fixed nested template instantiation for linux builds