{
throw new IllegalArgumentException("Detected attempt to add child node that is already the " +
"child of another node. Adding nodes multiple times is not allowed, since it could " +
"cause infinite loops.");
}
final ElementSelector pathElementSelector = node.getElementSelector();
if (node.getParentNode() == null)
{
node.setParentNode(this);
children.put(pathElementSelector, node);
}