Tweaked Slice deduping.

Added a test too.