Fix extra index increment in string escaping