I had a similar issue, and I discovered that the problem was that the other links did not have the ctools-use-modal class assigned to them. I got around this by writing a custom jQuery behavior that assigned that class to the appropriate links, in my case to the links in a pager:
(function ($) {
Drupal.behaviors.addCtoolsModalClass = {
attach: function (context) {
if (context = '#modalContent') {
$('#modalContent .pagination li a').addClass('ctools-use-modal');
}
}
}
})(jQuery);
This will cause your clicked links to stay within your modal.