Fix tests which checks stack deletion

Change-Id: I78a00afa257c487cc8cd6923a6b16c42f3c18859
Closes-bug: #1346798