In the description of the proximity algorithm in the documentation, the logic is described in terms of "a Web page in a .... Web folder", but no mention seems to be made of the order of the "Web folders".
I had long assumed that the order was also relevant, but I have recently observed that the resolved link doesn't always come out at the "closest" page in that sense.
Does the algorithm ignore the ordering, and if so, what is the result based on? Is it perhaps simply the first matching record found by a database query?
What would be the best way to ensure links would resolve to the closest match taking order into account?