Update resource stacks automatically

When moving resources between stacks during an update, update the
resource's stack pointer automatically when adding it to its new stack.

Change-Id: I92666589fe417f5d905104d5a0890650da70e825
Merge "Update resource stacks automatically"