xdiff/xhistogram: move index allocation into find_lcs