Fix the strangest JavaScriptCore bug that I've encountered in ages.

Closes #168. Read comment for more details.