I use Atmega 644pa, after burning the Sanguino bootloader, I can program the microcontroller. But I can just program the microcontroller one time, after which I need to burn the bootloader again, I don't know the reason and solution.
A workaround would be to upload the firmware with the programmer directly. The bootloader exists only for convenience, to allow people uploading without owning a programmer.
One possible reason for the failure is, your firmware is bigger than the available flash and your bootloader allows to overwrite it's self (which would be a bug). I'm pretty sure the bootloader coming with the Gen7 Arduino IDE Support package works properly in this regard.