Fix 'Invalid record header'

This pull request should as-is not be merged since it only contains a first change required in order to fix ARAKOON-373 ('Invalid record header' mess).

More changes (to TC internals) will be required later on.

Some initial review would be appreciated though.