You may have diagnosed your problem without knowing it. If your spark plug is loose, it will leak compression and make a ticking noise that won't go away after warm up. I would suggest have a shop install a spark plug insert (a relatively easy job-just make sure the piston is down by inserting a screwdriver in the spark plug hole-turn over the engine by hand until the piston is down-apply grease to the insert tap to catch most of the shavings). Anyone who has worked on an old VW motor knows this trick. It's way cheaper than overhauling the the motor, and you havn't got anything to lose by trying it. Also, try running a bottle of Techron additive per tankful of gas for 2 tankfuls. This will clean out any carbon build up on the valves or combustion chambers (another common cause of ticking noise). The best rule of thumb is "try the easy stuff first".
Good luck-
Bruce - Subaru of Santa Cruz