newctx was being implicitly instantiated

There was no 'var newctx' statement.