[lua-mode] Fix post-insert hook to only fire on insert action