Fixed a bug where disabled rules would prevent automations from activating.

Also, disabling or enabling a rule now updates its automation's activation state.