Ignore SecurityException that occurs in certain contexts for deregister