Fix forcomb with k=0, reading out of array bounds