I know of no code which states that you can't do this. Only that you have to have enough room to do it. I don't think overheating is a problem.
Of course, I am sure others know more about it than I do. I am not a master electrician.
I think you made the right decision. Those gophers offer more potential trouble than the pvc ever will.....
