(Classifier.map_layers_removed) (Classifier.layer_shapestore_replaced, Classifier.OnClose): Unsubscribe the messages in OnClose and not in map_layers_removed or layer_shapestore_replaced to make sure it always happens when the dialog is closed.