(cont.) After investigation I found out:
* The original document has `hyperref` and `hyperxmp`, and a `\hypesetup` after `\begin{document}`, and this works.
* Disabling `hyperxmp` works.
* Moving `\hypersetup` before the document beginning works.
The issue here is the endless loading without any error. An almost minimal working example: