Depends on airliner policy. If having the door locked is listed as a mandatory step to fly, it is a no-go defect.
With Transavia it would not have been, as they don't lock the door (as I was able to observe on two flights last month, with FAs hopping in and out of the cockpit constantly with food, coffee, and often with no apparent reason at all).
KLM policy since 11/09 is to have the cockpit door locked during flight, so for them it could indeed be a gripe serious enough to prevent departure.
I wish I were flying