It looks like a hidden form element that was supposed to be created when the server behavior was applied didn't get created properly. You can add it manually to fix the problem.
Add this to line 636:
<input type="hidden" name="source_mihidden_<?php echo $RepeatSelectionCounter_1; ?>" id="source_mihidden_<?php echo $RepeatSelectionCounter_1; ?>" value="1" />
Then update line 241 to:
$WA_loopedFields = array("source");
I think you must have made a mistake in your bindings. It looks like you have bound all of the inserted fields to recordset values. Usually one or more of the bindings would be set to a repeated field in the repeated region. To do that select the repeated field from the dropdown list on the bindings tab. I think that was the source of the original problem and the hidden field not being created properly in the first place.