Pass by value error

We were updating the page count of the copy instead of the original
document.