Fix updating from an empty stack

Change-Id: Ic63e1998316b27a431e856fe43b9ad8cc9dd887a
Closes-bug: #1343171
Merge "Fix updating from an empty stack"