It's purely closest by latitude / longitude...not much I can do, hence leaving in the option to over-rule with a specific preferred code, if you want to. Best of both worlds, really...
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.