Fixed parsing of multibyte files at byte 1024

From ruby bug #6393, ruby commits r35531, 35534