I still cannot reproduce the problem.
One thing that we are fixing in version 1.5.23 is to allow tool handles to be Panels. However you already know about that (Where to override redrawing a link when one of its linked nodes is moved - #6 by walter), and that situation does not apply to the existing PolylineLinkingTool sample in which you demonstrated the bug.
But the minified code that you quoted where the exception happened does point out that if for any reason Tool.findToolHandleAt returns null after a resegmenting, we should not allow the tool to be activated. We can make the code more robust.