It was an embarrassment and should have been better controlled, yes.
Surely the sergeant-at-arms or whatever authority they use to keep order could have ordered the gallery cleared.