inline getSiblingTreeNodes_internal
and refactor moveTreeDocAfter