Fix `unique: true` checking for updates