Properly filter the values returned by the root solver in closest.