Extracts the index number, if the dataset already has

If the dataset already has index and the save function demands creating
a new set of indexes [ i.e. making a new index key], then this change
helps in doing so.
To support the claim, I have created a new test case simulating the
scenario.

* Whether we have to drop the previous index / not is something we will
observe & accomodate