Fix branch on count loop in DoApplyArguments