Don't loop over all children to determine if the target node really is a child, just trust the parent pointer. Add tests.