[spatial_rels] bugfix: finding closest edge was wrong.