Fix performance when nested token doesn't match

close #53