Fix multiple crashes for some corner cases.
Increase max block size for variable dedup block sizes greater than 16KB.
Update test cases and fix a test script bug.