I thought it was a fantastic twist. Yes it was sad, but I think there's a good message there. All too often in kid's movies we see the hero/good guys get away unscathed. Showing that the victory took sacrifice was a brilliant move in my opinion. Besides Hiccup seemed to take it pretty well. I'm pretty sure the movie intended to end on a happy note, and I feel that it did..