Silenced a spurious warning.

Thanks Timo for the report. Regression from 2f65b8e1. Refs #21794.