Hate to tell you this but any two person in the cockpit rule is a false sense of security against a pilot who wants to take nefarious action because there are still items onboard the aircraft, such as a fire extinguisher or crash axe, that can be used as weapons to injure and incapacitate the other pilot or the other person in the cockpit while behind the locked door. The pilot could also put in a violent control input as soon as the other pilot vacates the seat but before the other person actually comes into the cockpit, causing injury to the pilot (and to the FA waiting to come in).