W.r.t. testing, I found TestBooleanMinShouldMatch. It had testNoOptionalButMin which added two MUST clauses. I added testNoOptionalButMin2 that adds only a single clause. It fails without the patch and passes with the patch. Other than that the tests in this class pass.
I updated the patch to include the additional test.
W.r.t. the optimization that was discussed: I don't understand how it can be done. BooleanQuery has a clauses list. It is not aware of any SHOULD, MUST or MUST_NOT clauses in its rewrite() method. So how exactly this optimization can be done? The only class that seems to be aware of the type of clauses is BooleanScorer2 in its add() method.