Test for punctuator tokens in lookupBlockType. Fixes gh-1856

Closes #1857