Fix racy modification of NotFoundHandler.