PS. A little bit more detective work and I found the lines causing the problem:
DUK_LOCAL duk_int_t duk__parse_func_like_fnum(duk_compiler_ctx *comp_ctx, duk_bool_t is_decl, duk_bool_t is_setget) {
        // ...
        DUK_D(DUK_DPRINT("second pass of an inner func, skip the function, reparse closing brace; lex offset=%ld, line=%ld",
                             (long) lex_pt.offset, (long) lex_pt.line));
        DUK_LEXER_SETPOINT(&comp_ctx->lex, &lex_pt);
        comp_ctx->curr_token.t = 0;  /* this is needed for regexp mode */
        comp_ctx->curr_token.start_line = 0;  /* needed for line number tracking (becomes prev_token.start_line) */
        duk__advance(comp_ctx);
        duk__advance_expect(comp_ctx, DUK_TOK_RCURLY);
        // ...
}
The offending line is exactly:
duk__advance_expect(comp_ctx, DUK_TOK_RCURLY);
because, for some reasons, Duktape expects a right-curly brace but gets an identifier instead... I believe that the syntax-error happens between the right-curly brace and the identifier b in:
(function(d,a){function b(a,b,c){Object.defineProperty(a,b,{value:c,writable:!0,enumerable:!1,configurable:!0})}b(a.Logger,"clog",new a.Logger("C"));b(a,"modLoaded",{})})(this,Duktape);Any suggestions? Does this help?
Cheers!