Find the common ancestor of multiple DOM nodes