I have found a bug in Kotlin JSR-223 implementation.
When you want to precompile a script with bindings, you have to add bindings to engine scope first, which is ok.
Later, when evaluating script with compiledScript.eval(bindings), Kotlin JSR-223 engine ignores those new bindings, and uses the ones from engine scope.
I run multiple scripts in multiple threads sharing the same engine instance, using shared bindings from engine scope is not thread safe.