tdb2: minor optimization for set_header