The "controversial" Mass Effect 3 ending has several major plotholes and contradicts previously established evidence.
Apparently it has so many mistakes ranging from major to minor (including entire sections of dialogue that don't hold up if you think about them as well as scenes that don't make sense) that there may be growing support for the idea that the mistakes are intentional, and the whole ending is actually a dream sequence
caused by the Reapers' indoctrination of Shepard.