Bugfix: custom panels are now cleaned up when the part they contain is closed