CONTRIB-5403 fix errors from orphaned surveys.