Fixed bug  in the proximity helper causing cross-structure detections.