Fixes BHV-13871

## Issue
Controls that were in the half plane but were very close to the edge were treated as ineligible to be the nearest neighbor

## Fix
Adjust precedence calculation to include all elements in the half plane