SQL : duplicate key value violates unique constraint - but no such values