Bug 870556 Use a set to avoid a linear search for duplicates r=irving a=starred