Fix creation of unique index on non-unique data not failing.