Ensure serial number does not go backwards.

Change-Id: Idb81e108c2be562c8514f1a732165917ddc0bb6e