issue #98 - update the saved state of a widget whenever the z-index changes. There is still a problem with the z-index logic, which is captured in #99