When going to new page, update bounding box correctly.

When going from one page to a page with other dimensions, after
the bounding box was changed (for example by drawing a table),
the bounding box was not correctly updated to the new dimensions.

Not 100% sure this is the correct solution, maybe this should be solved in generate_margin_box?