[PDI-11855] Some defensive programming to squash spurious errors.
Merge pull request #246 from wseyler/dev

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