This can cause problems if the timeout event you have identified has already been executed. Pending timeouts quite reasonably can be removed. Already executed timeout actions cannot be removed and may crash the browser if you try to remove them. Be sure that you are really removing a pending timeout.
A better technique is to set flags in global variables and use them to inhibit the creation of a new timeout event if you are using this for a kind of interval timer.