Fix unsubscribe

Previously, the subscription ID was set to the *length* of the subscriptions
hash.

This leads to instability in the presence of Unsubscribe where distinct subscriptions separated
by unsubscriptions can end up being given the same subscription ID