Fix misunderstanding in how sqlite checks for unique fields