I just googled the problem and found some threads where people reported having similar problems, such as:
Can't turn off HTC desire s after system update - Mobile Phones - Digital Spy Forums
HTC Desire s turn off problem! help
My update is, I do not have this problem anymore.I am not aware of doing anything to solve it, though, so probably it was a software issue which was solved by some software update... But thanks anyway.