Only return if an exact solution is available.

Otherwise planners may return an invalid trajectory when a timeout
occurs.