small fix to linkdead_d to prevent occasional bug