Fixed mistake in tests from commit 2039908. Refs #19816.