hashtable: Fix length calculation in hexport_r