index: fix nested function invocations

a(a()) -> yield a(yield a())