ZEN-10943: ported from ZEN-10997