Fixed optional clauses at the end of a sequence not being optional.

(E.g.  "awesome" "sauce"?  would match "awesome sauce" but not "awesome"
alone)
Merge branch 'capture-groups': pulled in final commit as well.