ZEN-12689: ported from ZEN-13214