You see nothing wrong with these rules?
They seem designed to enable incidents like this.
Better solution. Fire the TSA/HS bureaucrat who came up with the rules. No second chance.
The pilot is supposed to lock up his gun before leaving the cockpit. It was his extremely stupid decision to try and do so while landing the plane.