Fix a bug which does not allow bulk insert of nested arrays in mongo docs