On a whim I added a sanity check that matched parens have monotonically increasing LHS indices, but bug 613400 points out some counterexamples that must be explained.
Mass-reassigning cdleary's bugs to default. He won't work on any of them, anymore. I guess, at least. @cdleary: shout if you take issue with this.