Refs #20002; Use a customized each function