Fixing incorrectly flagged syntax errors in formulas with brackets.

Fix for Issue #359


Tests: http://jenkins.catrob.at/view/Catroid/job/Catroid-custom-branch-no-emma-test/226/
http://jenkins.catrob.at/view/Catroid/job/Catroid-custom-branch-no-emma-test/227/