Handle non-leaf nodes in nearest_from_distance
Handle non-leaf nodes in nearest_from_distance

Fixes #363.

nfnty/bspwm,JBouron/bspwm,medisun/bspwm,medisun/bspwm,medisun/bspwm,baskerville/bspwm,JBouron/bspwm,nfnty/bspwm,JBouron/bspwm,baskerville/bspwm,nfnty/bspwm