Properly hide tooltip when it is destroyed

Fixes #13031