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
childContext = inst.getChildContext();
      }
      invariant(
        typeof Component.childContextTypes === 'object',
        '%s.getChildContext(): childContextTypes must be defined in order to ' +
          'use getChildContext().',
        this.getName() || 'ReactCompositeComponent',
      );
      if (__DEV__) {
        this._checkContextTypes(
          Component.childContextTypes,
          childContext,
          'child context',
        );
      }
      for (var name in childContext) {
        invariant(
          name in Component.childContextTypes,
          '%s.getChildContext(): key "%s" is not defined in childContextTypes.',
          this.getName() || 'ReactCompositeComponent',
          name,
        );
      }
      return Object.assign({}, currentContext, childContext);
    } else {
      if (__DEV__) {
        const componentName = this.getName();
        if (!warningAboutMissingGetChildContext[componentName]) {
          warningAboutMissingGetChildContext[componentName] = true;
          warning(