Fix pathological N*2 behavior in the delta generator.