tcp: avoid initializing counters multiple times