Even today, I see pilots open the cockpit during flight to use the toilet. Usually, the FA blocks the passageway with a cart. It seems plausible to me that there's a short period of time that a well-trained ninja-like attacker could leave their first class seat, and obtain cockpit access.
But I guess it'd be too expensive to provide full pilot separation.