Added a check to isForwards() to make sure the start and end nodes are still in the document - otherwise, if one of them had been removed, we could have ended up in a situation where isForwards() returns false for both the original range and the reversed version, leading to unbounded recursion at the start of getOutermostSelectedNodes().
Added a check to isForwards() to make sure the start and end nodes are still in the
document - otherwise, if one of them had been removed, we could have ended up in a
situation where isForwards() returns false for both the original range and the reversed
version, leading to unbounded recursion at the start of getOutermostSelectedNodes().

corinthia/corinthia-editorlib,corinthia/corinthia-editor,corinthia/corinthia-editorlib,corinthia/corinthia-editorlib,corinthia/corinthia-editor,corinthia/corinthia-editor,corinthia/corinthia-editorlib,corinthia/corinthia-editorlib,corinthia/corinthia-editor,corinthia/corinthia-editor