RF-13559: backport RF-13018