int idx = dfoTree.getChildIndex();
CommonTree parent = dfoTree.parent;
if (parent == null) {
sinkTree = newDfoTree;
} else {
parent.replaceChildren(idx, idx, newDfoTree);
}
// pattern match again.
dfoMatches = dfoPat.match(sinkTree);
}
return sinkTree;