In this campaign level a ballista was thrown off a building when it was destroyed, but it didn't become attackable.
Saving and loading the save fixed this. I hope the issue is detectable anyway.
The ballista could attack.
It could not move.
It couldn't attack units standing in it.
It couldn't die by my archers spamming where it stood pretty thoroughly by f shortcut.