Replace copies with references in Pathfinder.