Fix `editor.selectedContainer`

I can't think of a good way to avoid that. The `There is a selection` test gives us coverage against `setCaretIn` not working and causing this test to pass when it shouldn't.