Why do some offline users disappear when un-groupped?

When Contacts/Group offline users is not checked off, some offline users remain in the contact list, but others disappear.

What is different about those and how can I fix them?

A wild guess. Maybe “Show empty groups” is unchecked also? Then maybe users disappearing and in the groups which has no online users at the moment, so the group is hidden then.