[Fix] Prefer higher version ANN profiles when symbol distances are equal
When multiple ANN profiles have the same symbol distance, the profile
selection would pick the first one encountered rather than the newest.
This caused issues when a newly trained ANN (version 1) existed alongside
the initial profile (version 0) - the scanner would select version 0
which had no actual ANN data.
Fix by adding a secondary selection criterion: when distances are equal,
prefer the profile with the higher version number.