Simplify set member with d+1 comparisons.