Having `blocksize` as a global variable leads to inconsistencies mentioned in #1.