The setup of Geeklog Security was before my time so I would have to look into things a little more to be 100% sure.
Root User may not necessarily be id of 2. Root group requires at least 1 user to be in root so if another user exists then id 2 could be deleted. (I believe this is how it works)
Anonymous will always be 1 though.
I agree some assumptions could be made in regards to groups to speed things up and from your examples it looks like you found a few instances that should be fixed.
Thanks for the forum post and I have added a issue in github for it.
https://github.com/Geeklog-Core/geeklog/issues/1082
One of the Geeklog Core Developers.