LearnBoost/mongoose — pull request #837 by boutell (2012-04-14 23:50:04+00:00)
Title: If an insert fails, set isNew back to false so the save operation ca be retried if desired

Without this a second attempt to save tries to do an update operation on a nonexistent document. This allows one to make the slug more unique and try again on a unique index error. Responding to the actual unique index error allows us to avoid race conditions.