Encapsulation of LastError and fix of LastError.errorBytesEnd.