Apache FOP Code fix

Code fix
by
JM
:

Bugfix: basic-links with internal destinations in documents with multiple
page-sequences sometimes pointed at the wrong page.