HIVE-8610-trunk: update patch according to RB review