Fix for Issue #291

Bracket handling "fixed" - would have been better to redesign the grammar from scratch, but this works too and is a lot easier.