Fix disappearing variables bug

This appears to fix a bug where all variables would be cleared when
exiting insert mode then opening a line below the current line.

Having only just looked at the code, I am obviously not familiar with
its inner-workings, but this change seems to fix the bug I was
experiencing as described above.