Widget persistence fixes

Sits on top of #7161
Introduced by an inadequate rebase on top of #7093