filter-branch: use $(($i+1)) instead of $((i+1))