LibSVM: Wrong index is written to output stream.