I am not familiar with the procedure in the USA, but in the UK at least the firearm and ammo will have to be kept separate when checked in. When you arrive the bag with the firearm inside would not appear on the baggage belt, but will be handed to you by an agent and signed for. Now after that has taken place then there is literally nothing that can stop someone just going off an loading the gun in the toilet and then doing what this guy did in FLL.
I doubt there really is any way other than say banning firearms from commercial flights, but then there is nothing to stop someone just entering an airport and doing the same thing, ticket holder or not.