Fix bug numbering new rows after reordering

New rows needed to be numbered differently after the reordering feature was
added; this is fixed, eliminating some problems with saving.