Fixes bitmask issue in index command header reading

observed behaviour would be that the next entry in the log would be
missing a couple of bytes in the beginning, most notably the log entry
version, so that command type would be read into log entry type field
and potentially throw exception saying "unknown entry[X]" or throw an
exception in the vicinity of such command in other interesting ways.