When trimming text fields in already existing entries, if this would result in a duplicate entry (which would raise an error when trying to save in the database) keep one of the two database records.