handle destroying widgets in thunks

* fix airgap for hasWidgets so that it's set on the parent of thunks if
  needed
* handle thunks when identifying widgets to be destroyed