BUGFIX: garbage collection could invalidate the shared/unshare var attribute

This is quite subtle and only affect was a (minor?) loss of laziness. However,
if this attribute were to be relied on for garbage collection, this turns into
a correctness issue.

As far as I can tell, the Lava Reduceron implementation has the exact same
problem and will need to be fixed.
emulator: shared attribute validation, conciser trace