Scott asked Larry to pull the pin for his putt. Scott's putt skirted past the hole coming to rest just off the green. Scott, still "away" asked Larry to put the flag back in the hole. Larry said “once a pin is pulled for you, and you putt, the pin cannot be replaced for you until after you hole a putt.” Scott disagreed say that the pin only needed to be removed when on the green for the practical reason of avoiding the two stroke penalty for hitting a pin while putting on the green. Scott reasoned that since he was off the green, no penalty would accrue should he hit the pin, so it could be replaced.
What is the correct ruling?