Fix 333 crash on duplicate key insert