Replacement on self is ignored

@phenaproxima this patch means
```php
$node->replaceWith($node);
$node->replaceWith([$node]);
$node->replaceWith([$aNode, $node, $bNode]); // this worked before, just including it for completeness.
```
will now work. If you agree please merge.