test: should unregister children when their scopes are destroyed