Being completely ignorant of the marvels of modern automation I am nonetheless somewhat surprised that the aircraft would allow this?!
On my Boeing, it does whatever we tell it. I don't know much about Airbus, but I would imagine the flap lever is one of the few where the crew have direct control over it.
I can see the mistake happening - it's a crossover between "gear up" and "flaps up" and two motor-actions albeit different levers - but as I said, I'd like to see the experience levels.