This was caused by the index of `vim.g.terminal_color_X` beginning at 1
rather than 0. I thought initially that this would be translated by the
Lua metatable but I guess not!
CLOSES#8
When using the self-referencial syntax to create new groups out of the
predefined attributes of another:
```lua
Foo = function(self) return {fg=self.Foo.fg, bg=self.Bar.bg} end
```
If either `Foo` or `Bar` were a highlight link, they would fail to be
resolved. This is now fixed.
Previous changes to this plugin prevented the terminal color from being
set.
Even before the changes, the terminal color was not set in all
conditions. Now it will be!
We shouldn't alter the contents of `attributes` during the function
call. Instead, we should create a new metatable for the background
color table, and assign it that way.
Highlight groups defined as functions now exhibit the following
behavior:
- Results of function calls are cached.
- Unresolved highlight groups are resolved before indexing.