ensure that keys are unique when processing sections

Handles errors that could occur in reordering when section names or ranks were not unique