Fix #4: TemplateCompletions don't work properly when caret is at offset 0 in document