Fixed race condition in deferred link detection.