Obviously Tywin knew his son was a kingsguard for Aerys. Do you believe he specified to his soldiers — “My son is NOT to be harmed in any way.” Or would that be something his banners presumed, and no such order was necessary?
Or — and this is unlikely — do you think he accepted the possibility that Jaime could die?
Come to think of it, perhaps the reason Tywin specifically sent his men to KL, rather than some other engagement, on the side of the rebellion was so that he could control the siege and ensure Jaime didn’t die protecting the Mad King.