tunneling: Add checks for header cache lock.