Fixes token nesting/empty tokens using DebugLint

Using DebugLint for random, shuffled, and incremental tests reveiled a lot of bugs.