... Hermione had been right; Professor Flitwick did indeed test them on Cheering Charms. Harry slightly overdid his out of nerves and Ron, who was partnering him, ended up in fits of hysterical laughter and had to be led away to a quiet room for an hour before he was ready to perform the charm himself. ...
I don't quite get what "out of nerves" means in this context. I've looked it up and it doesn't seem to be a set phrase. I guess it could mean "Harry is nervous, so he slightly overdid his Cheering Charms...". But I don't know if my understanding is correct. How should we understand it here?