Code was recently introduced to allow the insertion of documents containing $-prefixed fields, such that the document {$invalid: 'doc'} is no longer actually invalid. This is why n=2 instead of 1 like we expect in this test.
The solution should be to change {$invalid: 'doc'} in the test to something like {_id: /a/}, which is still considered an invalid document, so that we can still test inserting one valid/ one invalid document with the invalid write concern.