I don't think that would make a difference.
But the who's online code needs to be above the include statemnt for registerednav.tmpl.
It's pretty easy to accidentally place it above the unregisterednav.tmpl include statment. I've done it myself.
Also, double check that all variable names are used correctly. They are case sensitive. So $AnonUsers is different from something like $anonusers