Solved (seems like that)

If you first sort on column 1: "number" and then on column 2: "letter" then it doesn't 100% take into account that you sorted column 1 first. The last two rows from C should be other way around (the 3 should come before the 4). I believe this worked fine in 1.17. The exact same table is on: en:User:Basvb/Bug (version 1.17), there this searching method works fine (the last two rows from C are perfectly sorted on the 3 and the 4 from column 1). On incubator there is the same bug as here. Same effects when logged out.

number letter other number
1 A 5
1 A 2
1 B 4
1 C 5
2 A 1
2 C 1
3 C 2
4 C 2
5 A 2
1 A 2
1 Z 1
2 Z 0
4 Z 0