I'd prefer to check this condition in `updateHeaderData`.