Fixed bugs pertaining to header caching in data reduction.