Fix 'upsert' behavior with '_id' attribute.