Prevent infinite loop if notify callback triggers a click event