This is not a bug and the code is fine in pp-inc.php as whether we run it there or in the function it does not matter.
If you call update_whosoonline the code in that function or in pp-inc.php does the same and in fact the reason it is in pp-inc.php so we are not placing the code in 15 different integration files which would be lengthy