Wrap parent xpath in parentheses if it contains a union.