Set marginal content to set clone target once instead of per page
afterPageLayout called after each page. Generally will clone the cloned element present on page 1. If, somehow, an element matching something declared as marginal content is present on 2nd (or greater) page, it would clone that instead. After changes, set the clone target once to avoid such issues.
In my case, I have custom logic to rebuild grid columns that's causing marginal content cloning issues.