An invalid PDB may have no anchoring VarDecl when allowing errors, make sure not to crash in that case.