Variables reset after packaging [DEMO PROJECT INCLUDED]

+1 would also like this to be solved.