Fixed incrementing of snapshots

There was a logicial sorting error which prevented the creation of new
snapshots.