Must be ... if I use "render" (not "renderCompat") it works fine.

But how would I specify the compile-time argument correctly? If I use "typeof(model)" (or "const JavaRunVM") it errors out with:

Compiling diet template 'javarun.dt' (compat)...
diet.d(93): Error: cannot modify const expression model
/usr/include/d/druntime/import/core/stdc/stdarg.d(214): Error: cannot modify const expression parmn
/usr/include/d/druntime/import/core/stdc/stdarg.d(200): Error: template instance core.stdc.stdarg.va_arg!(const(JavaRunVM)) error instantiating
diet.d(96):        instantiated from here: va_arg!(const(JavaRunVM))
.dub/packages/vibe-d/source/vibe/http/server.d(844):        instantiated from here: compileDietFileCompatV!("javarun.dt", const(JavaRunVM),"model")
source/javarun.d(128):        instantiated from here: renderCompat!("javarun.dt", const(JavaRunVM), "model")
diet.d(96): Error: template instance core.stdc.stdarg.va_arg!(const(JavaRunVM)) error instantiating
.dub/packages/vibe-d/source/vibe/http/server.d(844):        instantiated from here: compileDietFileCompatV!("javarun.dt", const(JavaRunVM),"model")
source/javarun.d(128):        instantiated from here: renderCompat!("javarun.dt", const(JavaRunVM), "model")
diet.d(96): Error: cannot modify const expression model
.dub/packages/vibe-d/source/vibe/http/server.d(844): Error: template instance vibe.templ.diet.compileDietFileCompatV!("javarun.dt", const(JavaRunVM),"model") error instantiating
source/javarun.d(128):        instantiated from here: renderCompat!("javarun.dt", const(JavaRunVM), "model")
source/javarun.d(128): Error: template instance vibe.http.server.HttpServerResponse.renderCompat!("javarun.dt", const(JavaRunVM), "model") error instantiating