fix logic error in linkdead_d