workaround for misbehaving assert
Merge pull request #4637 from dimagi/fix-assert

workaround for misbehaving assert