[#284] attempt at fixing event unsubscribe when the layer is destroyed