which is dereferenced. if e.g. this agent is wrapped and never asked to choose the next link, the cachedNextLinkId may well be null. Also, the passed new linkId is now used as the next currentLinkId (which ordinarily doesn't make a difference,because of the equality check)