Merged fix from the 4.1-dev branch for trq-1763 - pbs_mom hangs.