linktool: correctly update chain startingLinks

Fixes #6948