core: $hdrcnt should not be indexed