Fixed errors introduced in 21f333bcefccc151d6439246f8203d609ab6ca79. Refs #17751