Suggested at Bug 102912. We don't need to walk up the DOM tree.
It seems we're using treeScope() already. Let's close. *** This bug has been marked as a duplicate of bug 106494 ***
Good catch. Thanks for the update.