Handle client selection in `nearest_from_tree`