lua : fix event not stacking the right value in some cases

this might help with #10246 but i'm not able to reproduce,so
waiting for houz on that

(cherry picked from commit b3c6c6db6f94dfa32a447b1cb3954939a0b61624)