I did this because it's unsafe to rely on the serial sequence to give ids that don't clash.