In convergence, resources have a tendency to appear and disappear in their
own time, not atomically with a change to the stack state. Therefore when
testing conditionals (i.e. looking for resources to appear/disappear) we
must be careful to take into account the states of the resources we find to
avoid race conditions.
Change-Id: I488921c6c4c3324912ded494db5ab9605becce9b
Closes-Bug: #1737796