See praekelt/vumi#668 for this.