Fix up bound check for cached headers