Guarding the notification for the state setter to avoid thrashing.