Do you remember the Neville of Sorcerer's Stone? The kid that lost his Rememberall? He ruined cauldrons, broke his wrist, ended up going to the stupid duel and getting cursed by Malfoy. And then, Neville he ended up in detention because the Golden Trio decided that they wanted to be dragon smugglers today. The detention that landed them in the Forbidden Forest? Yeah, that one.
And then, to top off the year, he ends up being cursed by Hermione, so that the trio can be the big heroes. But the joke is on them, slightly, because it's his ten points that push Gryffindor over the edge, winning them the House Cup.