Rebind popup when using setIcon to ensure proper anchor placement

Fixes #1874