When the content.metadata.set parameter is not set, the metadata set to edit is build from the field names founded into values parameter.
For repeater elements, the name is truncated without the prefix and index informations.
For example, a metadata named content.input.myrepeater.1.label become myrepeater.label.
To do this, we test all field names with the prefix content.input.myrepeater.1 to identify which ones will be treated.
But, if you have a repeater larger than 9 elements, you should also have the following field name content.input.myrepeater.10.label. It will be treated as the first element and will became myrepeater0.label.
Then edition fails.
To resolve this issue, you can change the numPrefix variable into getMetadataSet() method (3.9) or _createMetadataSet() method (4.0) like this :
String numPrefix = "." + i + ".";
Then change the newName variable like this :
String newName = parameterNames2MetadataDefPath.substring(0, prefix.length() - numPrefix.length()) + parameterNames2MetadataDefPath.substring(prefix.length() - 1);
It should be enough to solve it.