is_user_logged_in() returns different values on different pages

OK, figured out my own problem. In case anyone else stumbles across this and has similar issues:

The problem was due to incomplete/incorrect implementation of SSL. I had recently moved everything to SSL (and setup both wp-config and .htaccess to force use of https).

This created a problem for some links to pages that were not updated to include the ‘s’ in https. WP would still display the page correctly, but the cookies would break, therefore causing the incorrect return of is_user_logged_in().

The solution was embarrassingly simple: update the links to https.

error code: 523