Better bound checks on brace matcher

Fixes #31