From this page:
On the Arduino Uno, you'll need to connect a 10 uF capacitor between reset and ground (after uploading the ArduinoISP sketch).
You aren't using a Uno to program, but I suspect that disabling reset on the Mega using that method might help.