JavaScript parser: properly consume closing brace after a block in findCmdTerm()