Fix a bug where scopes were being duplicated for every single token

This improves scroll performance by generating many fewer span elements
to render lines.