Issue 6727: Side panels broken when an iframe is removed while an element inside it is selected