Confusing indeed!
I'm glad Beckett survived, I really like Kris Polaha and he'd get so much (undeserved) abuse for it by fans
EDIT the more I think about it the more I think that the reappearance and the shooting with Caleb wasn't needed. They could have ended it with the precinct and still flashed forward to seven years later to the Caskett happy ending but then used the extra couple of minutes to show the future for the other characters. They could have still filmed the Caleb scene but only shown it if there was going to be a season 9. I don't know