After a bit of testing, it seems to occur mostly after saving the map, then hiding/showing groups several times.