Fixed a nasty bug in RemoveDuplicates that would cause memory corruption./spipetest