ZEN-9979: ported from ZEN-10038