any_of with shared and unique scope