(Credit to a customer report here) This test would fail now:
Because it returns 3, 1, 0. The problem ultimately traces to the 'fast' bucket function that judges buckets based on a multiple of the gap between first and second elements. Errors multiply and the end of the final bucket fails to include the max.
Fairly plausible use case actually.
This can be tightened up easily with a slightly better expression. It will also fix this test, which is actually expecting the wrong answer:
(Should be Array(11, 10, 10, 11, 10, 10, 11, 10, 11))