Search counts wrong

When there are more than 5 files, the "Show all results" link is displayed. When I click that, I get "Next page" link. That's also OK. But when i reach the last search page (i.e. 2/2, 6/6, ...) the link is still there, allowing me to see an empty 3/2, 7/6 page, and even there, I can click it again, reaching 4/2, 8/6...