If a custom not found handler is defined, the router doesn't write the StatusNotFound handler.