In fact, smooth groups are supposed to be bitflags, not simply integer values (would be far too much simple!). This adds quite a bit of work, as with only 32 values, we can't just assign one to each group. Somewhat related to the "Four colors theorem"! ;) Here we simply use the first available bit for current smooth group (i.e. first bit not used by any of the already defined contiguous groups).