Fixed a bug in unique that affected single-attribute arrays
Added unique test