isSameNode() it does encapsulate the logic.
For this function nodes.indexOf(node) I will choose another name 'containsNode'.