Updated to make the logic closer to the original font linking object, while fixing the regression (which should make this less likely to introduce another regression, whether the logic is correct or not). Tested both Harmony Assistant and the gdiplus tests (including the interactive test case for font linking).
Running the gdiplus tests required Remi's patch from !7107, so the pipeline will most likely fail until that's merged.
I'm reading https://gitlab.winehq.org/wine/wine/-/merge_requests/7054#note_91586 as "I don't know enough to approve this change but I'm not opposed", and as such removing Nikolay as reviewer.