Prevent binary-tree deterioration in sparse switch statements.