In this case, it is more clear that
myValue is not a function, but the return value of the function.
Avoid deep nesting with Android/Rhino
On Android, Rhino will occasionally cause your app to run out of memory if you have several levels of recursion or iteration in a function. If you run into a "recursion too deep" error, try and flatten out your code in areas where you have several levels of nested loops or recursive code. If that's not a viable solution, you can also increase the size of the thread stack (see Android specific application properties section).
This issue is not a problem with the V8 engine on Android.