Comment 5 for bug 1738412

Note: the attached patch is incomplete, but the linked change should be good.