Simplify bucket bookkeeping.
Sort type-S substrings, sans repeated bucketing.
Add repeated bucketing.