Fix counter header length shortcut logic