improve 404 page suggestion algorithm (re #347)