And apparently, I am not the only one with this problem. And there seems to be no way to fix this. At all.
Luckily, at some point I found some 3rd party software that can rebuild an iPhoto library by basically simulating the user dragging all his images there manually and re-applying all the tags and stuff by hand. Honestly, what they are doing is quite an achievement in the face of an utterly defective piece of software.
Edit:
For the record, I used this tool to salvage my library: http://www.fatcatsoftware.com/iplm/