Replaced identity comparison with DOMNode#isSameNode(). Works better on HHVM. No functional change intended