When I fiddled with this option I forgot to manually enter in the next Sales Number, for the various Sales Types in the respective fields where this option is turned on. Hence, I also created duplicate invoice numbers for a day.
You just have to go and enter the next Sales number for each type of sales in the setup tab of sales numbering and hopefully no duplicates will be created.
I just checked again and if I turn on the function the next invoice number it would create is 32500398 when we are actually up to 32500416 so I would need to enter 32500417 in the Sales number field.