[Completion] Fixed off-by-one-error when parsing code incrementally