FOP-2106: Footnote put on earlier page than the one that contains the footnote call Patch by Alexey Neyman, committed with minor modifications