I actually came up with a scenario (a Win-Win as opposed to No-Win) for the end of Star Trek II which would allow Spock to live.
Now we all know the scene. Spock notices the energy pattern emanating from Reliant, David recognizes it as the Genesis Wave building up to detonation and Kirk says we'll beam aboard to stop it which David says can't be done.
The key point here is that there may not be a way to abort the detonation of the device but there is a way of rendering the device incapable of detonating.
(First of all they should have completely blown the ship to atoms before Khan had a chance top set the device in the first place. (Kirk should have known better than to give Khan the chance to make a suicide play))
ok onto my scenario
Spock realizes there may be a chance. he leaves the Bridge and instead of going to engineering he goes to the Transporter room and after nerve pinching the operator he beams himself into Reliant's transporter room where Genesis is being kept. he looks at it raises an eyebrow and says "Fascinating" then moves over to the transporter controls where he beams the Genesis Device not to anywhere in particular but sets it on hold (Much the way Scotty had Kang and his men held in stasis so that Kirk could bring security into the transporter room to take them prisoner. (Day of the Dove
) however, due to the fact that this ties up Reliant's transporter Spock has to have Enterprise beam him aboard with their transporter. (just as different ships have different Command access codes their Transporters also can be set to operate at different frequencies) Once Spock is aboard Kirk orders Chekov to complete reliant's destruction. due to the Genesis device being held in the transporter matrix, it's essentially held in stasis and therefore it's rendered incapable of detonating either through the designed detonation sequence or by enemy fire and as Reliant's completely destroyed the transporter, it's circuitry and anything held in it's are completely inaccessible from that point on.
Granted this changes the flow of what happens in Star Trek III and IV but......Well, one movie at a time