Hello, I am back with the names thing.
I got a person with Czech flag, named Ejvind Obel. Name, which, when I checked the files, turned out to be Danish.
I think I discovered the issue, and it is silly.
Since I am czech, my windows consider "Ch" a character, one that is just after "H" in alphabet.
This results in Chinese.nam being ordered between Hungarian.nam and Icelandic.nam, rather than between Canadian.nam and Congolese.nam.
Since I found no reference to the flags in the .nam file, I assume it takes the flag files in the same order as the .nam files, which results in all nationalities between Chinese and Hungarian getting the flag previous in alphabet, with the Chinese getting the Hungarian flag.
I will fix it for future soldiers by renaming the .nam files to also start with numbers.