ATtiny861 programming problem

Were you planning to report this issue to me so that it could be corrected in the next release of ATTinyCore?

There are a whole bunch of things here that don't add up....

Aaaah! I'll bet that's it - you initially bootloaded with optiboot definition. Then you did not connect a serial adapter as uploading using Optiboot requires, instead you just left the arduino as ISP connected. And the upload speed of arduino as ISP is 19200 baud.... which is the same as optiboot on those parts (that's also a problem, and I don't think that;'s what the optiboot binaries we use are actually expecting), and uses the same protocol so the upload "worked" and the IDE was none-the-wiser. But, subsequent uploads would not work, because for uploads through the bootloader the -e flag is not passed to avrdude so the flash is not erased...