ZEN-10859: ported from ZEN-10878