Use a Set

Minor optimization to avoid `Array#include?`