MDL-43089, improve repaginate class