Kotlin JSR 223 Scripting

Is there some peculiarity on the initialisation of Kotlin JSR 223 Scripting?

While my code worked on Kotlin 1.6.0, on recent versions, including 1.7.10,
it fails with the message:

javax.script.ScriptException: ERROR Unable to initialize repl compiler: