Fix `editor.selectedContainer`

I think that now it behaves much more as would be expected.