rewrite memory to remember pagination for search (bug 1011003)