Widget persistence fixes

Introduced by an inadequate rebase of the persistence API on top of #7093 (my fault)
:horse: