Fix varint() for several bytes values

Completely untested, but there was an obvious error.