use plan->has instead of creating a visited tag