Fix Ticket 4887

This patch improves handling of syntax errors in Tokenizer::simplifyAddBracesPair and fixes ticket 4887. Please consider pulling.

Thanks,
  Simon