Calling `ReactDOMServer.renderToStaticMarkup(elementWithPortal);` gets stuck in a loop while trying to do a static render.

Current behavior:
The behavior can be seen here: https://codepen.io/anon/pen/BmqWOM  by un-commenting line 58 (warning: this will make your tab freeze)

Expected behavior:
It should return with results or throw some kind of error if the input is not valid

var serialized = '';
  var delimiter = '';
  for (var styleName in styles) {
    if (!styles.hasOwnProperty(styleName)) {
      continue;
    }
    var isCustomProperty = styleName.indexOf('--') === 0;
    var styleValue = styles[styleName];
    if (__DEV__) {
      if (!isCustomProperty) {
        warnValidStyle(styleName, styleValue, getStackAddendum);
      }
    }
    if (styleValue != null) {
      serialized += delimiter + processStyleName(styleName) + ':';
      serialized += dangerousStyleValue(
        styleName,
        styleValue,
        isCustomProperty,
      );
      delimiter = ';';
    }
  }
  return serialized || null;
}
function warnNoop(