Unfortunately, I can't easily add a test for this, because the repro depends on some details of DWARF layout; but I've confirmed that it fixes a bug repro on another branch.