Fixes call stack size error (#68)

This PR adds a test reproducing the error reported in #68, and the applies a fix for it (adapted directly from #32, which would no longer merge cleanly).

I'm also sending a PR with the same three commits on [apiaryio/Amanda](https://github.com/apiaryio/Amanda). I'm not sure which is "canonical" anymore; this repo has all passing tests, but apiary's is what's used by [apiaryio/gavel.js](https://github.com/apiaryio/gavel.js) (and has several failing tests).

Thanks!