You operated illegaly and recklessly.
Whoa, ease up de facto!
Re-read the original post.
So the aircraft went back to stand and found out that the flap indicator was busted and needed replacing.
After push back a fault was found and the aircraft returned to the gate...case closed.
The OP then poses the hypothetical question
So my question is, what happens if this was in flight?
Personally I would be looking at doing a "Trailing Edge Flaps Up Landing".
Whereas most regulatory bodies will allow the commander of an aircraft to fly in any way (s)he sees fit for the purposes of saving lives, I don't believe we are at this stage yet. Boeing also caution about troubleshooting, in case it makes a situation worse.