Some backends might need special handling for auto-increment values. This was introduced in 5fa5621f. Thanks Michael Manfre for spotting the issue. Backport of 0cdfa76e from master.