I think I found the issue. When you loop over the entries your code:
var entry = entries[i];
entry.Rank = i + 1;
Entries is a struct so you create a new value that you set the rank of, leaving the value in the array unchanged.
It worked for me if I replaced it with just:
entries[i].Rank = i + 1;