requireCurlyBraces: correctly set error pointer

Fixes #799