See the issue and the test case with original fix in https://github.com/facebook/react/pull/14802. We'll need to fix it properly, see https://github.com/facebook/react/pull/14802#issuecomment-463277621.