Avoid redundant conversion to slice

[#81524216]