When creating an Element with a ref from inside of a constructor an error is thrown in production mode, but not in dev mode.

Here is a minimal sample:
https://jsfiddle.net/84v837e9/35/

An error, "Only a ReactOwner can have refs", should happen in dev and production modes.

This is happening in React 15.4
inst = null;
      ref = jest.fn(value => (inst = value));
      var divInst = null;
      var ref2 = jest.fn(value => (divInst = value));
      result = ReactDOM.render(
        [<Comp ref={ref} key="a" />, 5, <div ref={ref2} key="b">Hello</div>],
        container,
      );
      
      expect(ref).toHaveBeenCalledTimes(1);
      expect(ref.mock.calls[0][0]).toBeInstanceOf(Comp);
      expect(result).toBe(ref.mock.calls[0][0]);
      expect(ref2).toHaveBeenCalledTimes(1);
      expect(divInst).toBeInstanceOf(HTMLDivElement);
      expect(result).not.toBe(divInst);
      ReactDOM.unmountComponentAtNode(container);
      expect(ref).toHaveBeenCalledTimes(2);
      expect(ref.mock.calls[1][0]).toBe(null);
      expect(ref2).toHaveBeenCalledTimes(2);
      expect(ref2.mock.calls[1][0]).toBe(null);
      
      result = ReactDOM.render(null, container);
      expect(result).toBe(null);
      
      result = ReactDOM.render(5, container);
      expect(result).toBeInstanceOf(Text);
    }
  });
});