Fix resolving for Ref function

Fix problem with incorrect choicing of Ref class during update.
When we call reparse function in __setitem__ method we use,
old version of stack template. So Ref function cann't find
new 'Resouces' in template.

Closes-bug: #1285067
Change-Id: I82eeeef0c3c626f0ec3df5a827a7ec049929538f
Merge "Fix resolving for Ref function"