Refs #17453.  Backport 7e290a2baf2c9e932f618f6cfd191a41f404b997 to 1.8.x.