It'd be great to cache the value of `terms[termId]`, something like this:

```
<% var term = terms[termId]; %>
```