PR19601: testcase improvement

The test can now catch all cases:
 - no removal of the 'no-integrated-as' flag
 - bogus removal of the flag, like when the remove_if was not followed by an erase