Fixed header tag matching.
Fixed highliting becoming out-of-sync after tab handling.