Fix sharing comparison crash bug

Dotstorm now checks whether sharing has changed before assigning it; but
was calling toString on group_id to see if the group_id had changed
without checking if the group_id was undefined.  This led to a crash bug
in production (bad!).
Add test for previous crash bug