Ensures that pages and covers are grouped together. (cherry picked from commit 8568d5d6c3ceae0084a350906b330f23dab571e1)