Fixed a failing test introduced in 918a16bc4c099ab0cae72a231de3e99e2a9d0...

...2cb.

Refs #22307.