Adding saving of the last value in an '_' var. Fix for #848

Do not commit this yet. Needs unit tests. I am pushing it so others can weigh in / try it out.