Previously, the parser read the first statement of the goal as its
precondition, but didn’t check that it was properly terminated with a
closing parenthesis. This allowed arbitrary text to be included within
the goal description without error, which was incorrect.
This commit fixes this issue and adds a corresponding unit test.