imported patch bugs/992878-assertion-21.patch