Fix wrapping pages with outlines.

I fixed problem described in Issue #23. Now wrapping pages with outlines works properly.