Psudocode implementation of true envelope
As far as I can say, your interpretation is valid, but given the pseudo-code you provide, somehow, there seems to be some confusion with the definition of the quantities. 

In my understanding, the $A_i(k)$ are the (real-valued) $\log$-amplitudes. For this reason, you do not need to compute the $\log$ of these values.

Then, the $V(k)$ are actually also $\log$-amplitudes. While I can understand to some extend that you use the same name both for $V$ and its inverse Fourier transform, this may be confusing when trying to understand the algorithm (and debugging it...). In addition, this could be an issue, depending whether the result of the IFT is real or not - this, in turn, depends on whether you "hermitianize" your vector $A$ before the IFT.

A tentative correction for your pseudo-code would be:

v = array of -9999999
a = log(mag(fft(x))
repeat a couple of times:
    for k from 0 to a.size():
        a[k] = max(a[k], v[k])

    vc = ifft(a) // let's assume vc is complex Hermitian, so we just keep the first half of the vector 
    vc[from 50 to v.size()] = 0
    v = fft(vc) // here, be careful that the result is real 


I did not try to implement it. Nevertheless, it seems to make sense that way. Let me know if that solves your problem!