I was initially let down by the ending, for both the reasons you cite and because it seemed out of character. But it makes perfect sense if you refer back to an opposite sequence that more or less immediately precedes it in the film. It's actually rather satisfying in retrospect.