TRQ-2638. Correct an infinite loop in the mom's job cleanup code.

Conflicts:

	src/resmom/test/mom_job_func/scaffolding.c