Replace owned with borrowed pointer.

As pointed out by cmr, there's no need for it to be owned there.
That was also in the original scope of #7711.