Throw exception if a track does not have a valid index.