Fix logged 404 errors without paths

This should probably be submitted upstream as well