Borrow code from the fix over at https://github.com/ValvePython/vdf/pull/61
Borrow code from the fix over at
ValvePython/vdf#61