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
!Component.childContextTypes,
            '%s.childContextTypes is specified but there is no getChildContext() method ' +
              'on the instance. You can either define getChildContext() on %s or remove ' +
              'childContextTypes from it.',
            componentName,
            componentName,
          );
        }
      }
    }
    return currentContext;
  },
  /**
   * Assert that the context types are valid
   *
   * @param {object} typeSpecs Map of context field to a ReactPropType
   * @param {object} values Runtime values that need to be type-checked
   * @param {string} location e.g. "prop", "context", "child context"
   * @private
   */
  _checkContextTypes: function(typeSpecs, values, location: string) {
    if (__DEV__) {
      ReactDebugCurrentStack.current = this._debugID;
      checkPropTypes(
        typeSpecs,
        values,
        location,
        this.getName(),
        ReactDebugCurrentStack.getStackAddendum,
      );