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