After this commit (2460f0a702), the `hl_cache` variable
stores the hl_ID instead of the group name.
Another way to get the hl name which is adopted from the method used
here `_get_hl_from_capture`:
```lua
local hl = vim.treesitter.highlighter.hl_map[query.captures[id]]
```
But, as the method covers another case, we can directly use it.
I've also added the type guard so that, in the future, it does not
explode like it does now.
fixes: #1151