Yeah, I was thinking that it was this "enemy of my civ" bug. But then why did it only turn hostile during that one goblin siege? I so far had not had it turn hostile in any other case. If it had been always hostile I'd have said "sure, it's that bug".
But it behaves normally, even killed the goblin prisoners I fed it without any mercy.
Then again, I think the prisoners were also fighting among themselves due to being from different goblin entities. I wish there was an easy way of pitting all the almost 200 goblins and trolls I have in cages so I could do some nice "scientific" research on them. Masspitting doesn't seem to work safely anymore - even though pitting worked fine in another fortress I had earlier...
"Sadly" I haven't had any new incidents since the last time. It also didn't attack the trained cave dragon I have in the same pasture, btw - just focussed on my dwarves.
EDIT: Two further incidents, one without there even being a siege or anything, the second time I send my newest squad into the pen-room during a goblin siege and that thing attacked straight away. Luckily, and quite surprisingly - as they are not anywhere "near legendary" or such - not a single one of my dwarves even got hurt during the fight. There's A TON of hydra teeth around now, besides some body parts... And again, the cave dragon just sat and watched.
I guess the attacking was because the hydra is an enemy of my civilization. Oh well, I'll not try to tame them again - unless I just want to butcher them.