Fix crash due to index-out-of-bounds in feature translation