correctly handle partitioned table indices and templates