Fix lock double-release.

The exclusive lock for from-JavaScript closure invocation was released
twice when an exception was raised during evaluation.
Add qualification to mainModules.

mainModules is not in scope here (JavaScript evaluator was V8
3.22.24.10).