Fixed crashes with indent/outdent and nested lists,
as well as removing list formatting from deeply nested lists.