Fix bug in varint packing that causes 0s to throw an exception

Womp womp.