This is more of an educated guess than a solution but here's what I'm seeing:
In the database table ost_groups the dept_access field is set to varchar(255). What may be happening is that because you have so many departments that field is actually needing more space than 255 characters. You could try changing that field to "text" instead and see if that solves your problem. Make sure and do a backup of your database before you go mucking with it though, I take no responsibility in any potentially lost data. (Changing it from varchar(255) SHOULDN'T have any negative effect but you never know).
The system is expecting to see a shorter list here like this:
9,6,8,5,13,10,1,12,3,4,11
and you are probably giving it something more like this:
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100
Which it can't handle, so it truncates the input to 255 characters (which in your case is probably the 65 depts).