<!-- Please answer both questions below before submitting this issue. -->

### Which website or app were you using when the bug happened?

Please provide a link to the URL of the website (if it is public), a CodeSandbox (https://codesandbox.io/s/new) example that reproduces the bug, or a project on GitHub that we can checkout and run locally.

### What were you doing on the website or app when the bug happened?

If possible, please describe how to reproduce this bug on the website or app mentioned above:
1. <!-- FILL THIS IN -->
2. <!-- FILL THIS IN -->
3. <!-- FILL THIS IN -->

<!--------------------------------------------------->
<!-- Please do not remove the text below this line -->
<!--------------------------------------------------->

### Generated information

DevTools version: 4.13.1-93782cfed2

Call stack:
    at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:21447:43
    at bridge_Bridge.emit (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:19607:22)
    at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:19767:12
    at listener (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:37788:39)

Component stack:
(none)

GitHub URL search query:
https://api.github.com/search/issues?q=Cannot%20add%20child%20%20to%20parent%20%20because%20parent%20node%20was%20not%20found%20in%20the%20Store.%20in%3Atitle%20is%3Aissue%20is%3Aopen%20is%3Apublic%20label%3A%22Component%3A%20Developer%20Tools%22%20repo%3Afacebook%2Freact
const Wrapper = ({forwardedRef}) => (
        <Nested depth={3} forwardedRef={forwardedRef} />
      );
      const Nested = ({depth, forwardedRef}) =>
        depth > 0 ? (
          <Nested depth={depth - 1} forwardedRef={forwardedRef} />
        ) : (
          <div ref={forwardedRef} />
        );
      const ref = React.createRef();
      act(() =>
        ReactDOM.render(
          <Wrapper forwardedRef={ref} />,
          document.createElement('div'),
        ),
      );
      expect(store).toMatchSnapshot('1: mount');
      const deepestedNodeID = agent.getIDForNode(ref.current);
      act(() => store.toggleIsCollapsed(deepestedNodeID, false));
      expect(store).toMatchSnapshot('2: expand deepest node');
      const rootID = store.getElementIDAtIndex(0);
      act(() => store.toggleIsCollapsed(rootID, true));
      expect(store).toMatchSnapshot('3: collapse root');
      act(() => store.toggleIsCollapsed(rootID, false));
      expect(store).toMatchSnapshot('4: expand root');
      const id = store.getElementIDAtIndex(1);
      act(() => store.toggleIsCollapsed(id, true));
      expect(store).toMatchSnapshot('5: collapse middle node');
      act(() => store.toggleIsCollapsed(id, false));
      expect(store).toMatchSnapshot('6: expand middle node');