Fixes https://www.commcarehq.org/couchlog/view/dc2713452199e59c36269cd611320215/