Problem/Motivation The non-javascript fallback link has an empty destination parameter. This mostly only affects integration tests without javascript.
Steps to reproduce Clicking on an AJAX link on any page other than the flagged entity's canonical route with javascript disabled does not redirect back to the original page.
Proposed resolution
It looks like there's a missing return statement in AJAXActionLink::getDestination() which could be the culprit. I'll create a patch and test that later today.