Panel: Do not store ID inside the widget

Fixes gh-6769