* Duplicate document before doing anything with it. (Fixes unwanted group unfolding.)