When you arrive in the Tikkun System, the Geth are clearly sapient and sentient. However, while you are there things change.
You were doing the fighter base mission and other missions you were shutting down Geth servers. When you did that you made them less intelligent. When you destroyed the reaper on Rannoch, you destroyed that which was giving the remaining Geth the ability to organize without the servers. The Geth fleet up in space essentially became.... semi-intelligent toasters.... And when you had shut down the servers, they had nowhere to download their programs. The remaining Geth would have probably failed the Turing Test at this point. Legion still had remnants of code from the "old machines."
At this point it was over. The Quarians had won.... unless you allowed Legion or Not Legion to upload the reaper code and make the space junk intelligent again.
The moral dilemma was choosing lettiing Legion create a new race of AI synthetics that were not Geth and were capable of wiping out the Quarians and would do so, or not allowing Legion to do that and letting the Quarians destroy what was now essentially space junk, or allow Legion to create the new race use the Red/Blue "I win" button.
That's after Shepard and the Quarians start destroying their AI infrastructure and severely distrupting the collective link that forms much of the basis of their species. Not too different from, say, if a race of aliens attacked Earth, making our nice and orderly societies collapse into civil disorder, and heck throw in some alien gas that makes our poor nervous system break down and render us all meek and apathic or something.
Would we not be humans after this fact? If someone tried to reverse the effect of the gas and side effects included higher perception and intelligence for all mankind, would this make us "not humans" anymore?
I'm trying to wrap my head around the concept that because they don't work exactly like us, they are space junk. And I find precious little validity in it. I know Legion himself said that to judge other species exactly like our own in all respects is potentially racist, but I'm pretty sure he wasn't advocating that we consider entire species like objects because of what I see as largely technical differences that mostly serve to justify a belligerent narrative. Ants don't work like us at all, yet I see no one saying that aren't "alive" because of it and that killing all ants is thus acceptable (albeit we admitedly don't mind massacring them either, I suppose). And I'll presume that it is because, unlike the Geth, no one has any interest in killing all ants.
@Master Race: No, I'm using the logic that if it can move on its own (obvious), have its own thoughts (Legion clearly expresses them, and Geth processes can achieve a collective consensus so thought is clearly implied) and ideas (The Geth have invented since the war, heck their inventions are good enough the rest of the galaxy has started using some of them, and they were in the process of building a Dyson Sphere), it is sapient at the very least, and very probably sentient. English is not my first language so I can't match many people in scientific-sounding mumbo-jumbo, but it is how I see it. After that, obviously physical and technical distinctions exist, but that's not too different from, say, Elcor being very different from humans in several ways.
Your differences seem arbitrary as hell to me, not to mention questionable. Because they can't feel pain? Yet Legion has cries of "pain" when shot at in ME2 and enemy Geth emit a sound when they die, which can imply they actually can; and if I am mistaken and this remains a serious critera, well, slap some pain receptors on them and call it a day. I'm not sure why they would even need pain reception anyway, they are highly sophisticated machines that don't need such arguably crude methods to understand that their integrity is in danger, unlike creatures of flesh for whom pain is a survival mechanism.
No emotion? Yet Legion exhibits many of them in ME2, it even shows up thanks to the "flaps" on his head. Most tellingly, he is visibly pissed off (and probably very fearful too) at Shepard if they choose to stop the upload and tries their best to stop them, so obviously it views Shepard's actions as a clear negative. The Geth Prime in turn "regrets" the death of the Creators if you kill the Quarians, and Legion states that they stopped themselves from exterminating the fleeing Quarians because they weren't ready to deal with the implications of such an act, which indicates they can doubt.
No art? Maybe not as we understand it, no, but they are capable of design (their weapons, space station, different body types suited for various applications, the Dyson Sphere) and they are capable of worship; that the underlying explanation is a math error is not anymore shocking to my eyes than if we found tomorrow that humans who believe in higher powers have X region of their cerebral cortex more developped than another or something along those lines. Maybe they simply see no value in art, being too utilitarian for that. That sounds more like a specie's quirk and not an indication that I can treat them like my oven despite the many obvious differences.