Use optimal indices format when we can.