Merge "Prevent exception when stack being removed on crash" into pi-dev