I'm working on a patch to only unmount pools that we've mounted as part of the installation to prevent unmounting pools that don't belong to us.
Regarding your other issue, it is possible that using /dev/sdX for vdev causes it. Depending on the type of block device these names are not stable and may change on boot or when udev runs. It's more reliable to use /dev/disk/by-uuid or /dev/disk/by-partuuid which are persistent.
I'm working on a patch to only unmount pools that we've mounted as part of the installation to prevent unmounting pools that don't belong to us.
Regarding your other issue, it is possible that using /dev/sdX for vdev causes it. Depending on the type of block device these names are not stable and may change on boot or when udev runs. It's more reliable to use /dev/disk/by-uuid or /dev/disk/ by-partuuid which are persistent.