Hubert, it looks after upgrading I ran into the same situation. I’m getting the same url /wp-admin/upgrade.php?_wp_http_referer=%2Fwp-admin%2F
I think your solution will work, BUT I don’t know how to
“I had to flush memcached, and I can login again now.
I noticed this by tracing the PHP code in /wp-admin/admin.php.”
Would you mind letting me how you did that?