index-pack: fix buffer overflow caused by translations