Fix clustering algorithm in switch expansion.