Steps to reproduce:
- Start with a main wiki with a user xwiki:XWiki.Admin belonging to the xwiki:XWiki.AdminGroup group
- Create a subwiki that doesn't have any local users
- In the subwiki, while logged in as xwiki:XWiki.Admin, execute this velocity statement: $xwiki.user.isUserInGroup("xwiki:XWiki.AdminGroup")
It should return true, while the result is false.