Fix race in multipart form parser