Getting 'bool(false)' output before normal page HTML
It seems that the problem went away if I commented out the user_module_invoke() call inside user_login_finalize().

Obviously, I didn't want to maintain a patch for that, nor did I want to take out that behavior, as I may want to use hook_user_login() sometime. So, I basically copied user_login_finalize() into my own private function, removed the user_module_invoke() call, and am now using the private function for my particular need. Seems to be working fine!