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
}
    }
    const container = document.createElement('div');
    const a = ReactDOM.render(<A />, container);
    expect(a.refs.span).toBeTruthy();
    ReactDOM.unmountComponentAtNode(container);
    expect(a.refs.span).toBe(undefined);
    expect(layerMounted).toBe(true);
  });
});
describe('root level refs', () => {
  beforeEach(() => {
    var ReactFeatureFlags = require('ReactFeatureFlags');
    ReactFeatureFlags.disableNewFiberFeatures = false;
  });
  it('attaches and detaches root refs', () => {
    var ReactDOM = require('react-dom');
    var inst = null;
    
    var ref = jest.fn(value => (inst = value));
    var container = document.createElement('div');
    var result = ReactDOM.render(<div ref={ref} />, container);
    expect(ref).toHaveBeenCalledTimes(1);
    expect(ref.mock.calls[0][0]).toBeInstanceOf(HTMLDivElement);
    expect(result).toBe(ref.mock.calls[0][0]);
    ReactDOM.unmountComponentAtNode(container);
    expect(ref).toHaveBeenCalledTimes(2);
    expect(ref.mock.calls[1][0]).toBe(null);
    
    class Comp extends React.Component {