Opportunity link from Quotes redirects to Home if clicked AFTER a PDF of the Quote is printed.

This is a totally weird one I've not yet solved...

Load a Quote that has an Opportunity in the Relate field. Click on the Opportunity Name and it takes you to the record view of the Opportunity.
The URL behind the link is:
               

https://MyServer/dev/sugarcrm/index.php#Opportunities/c35768df-12ea-01c7-3e35-4eea...

Now load the same Quote, Print PDF. Let the PDF download. Hover on the Opportunity Name, the link is identical to the one above (right click copy/paste shows they are identical), correctly pointing, it seems, to the Opportunity record view but... when I click on the Opportunity Name it redirects me to the Home screen here:

https://MyServer/dev/sugarcrm/index.php#Home/e74176bd-e57e-c65a-6c1e-54e799b69e9f

Where could this redirect be coming from? And why only after printing the PDF (which of course is heavily customized at the script level).

The mystery thickens... never a dull day :)

FrancescaS