add test case; removed node still has the document as its parent. So we need to check if a doc wants to remove itself