[PDI-11855] Some defensive programming to squash spurious errors.