This is why you always keep the default template and not edit it.
Look into this hack:
https://vborg.vbsupport.ru/showthread.php?t=152931
Your templates should not affect this at all. When I said rebuild I meant exactly:
Admin CP > Maintenance > Update Counters > <==== Run those... I forget how you rebuild the bitfields. I'm pretty sure when you delete files and goto usergroups it does it automatically.