Simplify broken-link diagnostic code.