Adding get_next_name to data_sets

DataSets had a bug #1162 that had to do with creating the next name for a DataSet. While this will be going away in the near future, it is a bug now, so have a patch.