If you can’t undo it, maybe:
Also, there’s a related feature request that (if implemented) would allow a workaround for this.