Fix problem with dragging partially selected link

Fixes #841