None of the above. I sent Legion back to the ship with the survivors because I wasn't sure how much danger they would run into, and as a result my combat rating was lowered so Mordin being the weakest was killed during the rear guard action. According to the official stats, apparently this is the most common mistake people make. I say it's rigged, you can do everything right and still get screwed over by a hidden feature.