Accessing _index variable inside painless script?

So it seems _index is no longer accessible from painless scripts: