Handle irregular input a bit more flexibly
Merge pull request #4953 from dimagi/opm

Prevent 500 on OPM HSR export