The 3 in the second parameter is the indication of the maximum number of units in the group that it will allow the unit to join with (including itself.) So by changing it to 3 it allows the settler group to take two additional defensive units from city defense AI.Code:if (AI_group(UNITAI_SETTLE, 3, -1, -1, false, false, false, 1, true))
I still don't see why this should be a issue because settlers use the ContractBroker to get units as escort. I don't see that line of code anywhere in this piece of code

The issues i noticed are that sometimes they start moving without any escort and the escort might be to weak. The answers must be in CvUnitAI::AI_settleMove.