Return 404 rather than TypeError for invalid requests under /static/