As far as implementation goes, I'm not 100% on how to do this, but I believe that if you make exact copies of all of off1 and off2, and make them some separate catagory (Let's call it offp), then you would be able to have the players purchases of the original upgrades (off1 and off2) be separate from the granted upgrades in the temple (offp).
The only problem I can foresee with this is that it might accidentally double the upgrades if they have already purchased them, giving too much damage, but I don't know how exactly the buffs work.