Fixed a failing test introduced in 918a16bc4c099ab0cae72a231de3e99e2a9d02cb.

Refs #22307.