Trying all bag elements common ancestors