Fix [''] and [""] completion query have incorrect end offset