fix legacy index insertion
improve check for write concern error in collection tests