Fixed a failing test introduced in 918a16bc.

Refs #22307.