Fix infinite recursion bug on tooltip/popover.

When the math popover is closed, it calls for the tooltip on the remove icon
to be destroyed. This causes a hide call on the tooltip, which causes a hidden
event on the icon, which propagates to the tooltip, triggering the entire
process again. By stopping this propagation, the error is avoided.