Fix multiple_pages for sequence_lenght==pagesize

The previous test was obscure and wrong for the case where
sequence_lenght==pagesize.