RF-13584: fix tree key converter (port RF-13235)