This change backports a minor modification of the x/tools version of this
code back into the std library. It simply ensures that both versions of
the code are the same and will simplify keeping them in sync down the
While this is an API change, this is an internal package, so we're ok.
Reviewed-by: Alan Donovan <firstname.lastname@example.org>