Preserve invisibles in editor model across serialization

Fixes #3281