OK, I did some more testing and found the problem.
What is happening is that the PIC starts to run the code, THEN the T1OSCEN is set in the code, then that takes over the T1OSO/PGC line, so the programmer can't clock program data to do program read of the device ID or any other operation.
My EasyPIC6 has a plug-in xtal, so unplugging the xtal meant the PIC did not execute code and the T1OSCEN doesn't get set after a reset, and it can now be reprogrammed with no dramas.
If you are using the internal RC osc (like I do on my Junebug) then this is going to be a problem.
The root of the problem is that the PK2 programmer resets the PIC, then is sloppy and lets the PIC execute a few mS of code, then does another reset, and by that time the T1OSCEN has been set so programming (or reading device ID) can't happen.
I just tried another solution, I put a 3 second delay in the code so after reset it takes 3 seconds before T1OSCEN is set. Now even with the xtal in place I can manually reset it, then as long as I click "program" before the 3 seconds expires it will reprogram with no issues.
So if you are getting this programmer bug it can be worked around by;
1. stop the PIC clock (remove xtal etc)
2. put a couple seconds delay before turning T1OSCEN ON
3. use a button etc to turn T1OSCEN ON/OFF as needed
3. use any software system to turn T1OSCEN OFF before you want to program next time
4. get a better programmer