Heh, having said that, I've found a minor bug. Here's the (sorted) numbers that are returned from one example run (In all tests, the additional 0 is present, but one number may be missing from anywhere else in the list:
0
0
0 <---Should not be here
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
10
10
11
11
12
12
13
13
14
14
15
15
16
16
17
17
18
18
19
19
20
20
21
21
22
22
23
23
24
24
25
xx <---Should be another 25 here
26
26
---All further numbers are fine.
Flumoxed currently, but will take a further look...
0
0
0 <---Should not be here
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
10
10
11
11
12
12
13
13
14
14
15
15
16
16
17
17
18
18
19
19
20
20
21
21
22
22
23
23
24
24
25
xx <---Should be another 25 here
26
26
---All further numbers are fine.
Flumoxed currently, but will take a further look...