This seems to be a really old bug but new interactions with macOS (probably due to macOS 13 Ventura) caused it to surface and crash. Previously it was assuming a call to removeTrackingRect must always come only after addTrackingRect was called, which was not a good assumption to make. As a result, we could call this and end up triggering other code in macOS when passing in a 0 tracking tag.
This seems to be a really old bug but new interactions with macOS (probably due to macOS 13 Ventura) caused it to surface and crash. Previously it was assuming a call to removeTrackingRect must always come only after addTrackingRect was called, which was not a good assumption to make. As a result, we could call this and end up triggering other code in macOS when passing in a 0 tracking tag.
Fix #1333