The conversion to a set is not really necessary here (and few places below).