Why doesn’t my page know it’s a page (won’t return true for is_page())?

The problem was due to a secondary loop in the page—before this loop, the page knows it’s a page; but after the loop (and in the footer, where the Admin Bar and my code would be rendered), the page thought it was the last post of the secondary loop.

Neither wp_reset_query() nor wp_reset_postdata() worked; I am guessing this has to do with the fact that I use $wp_query as the name of the secondary loop (so that I could use the loop.php template file to display the posts). Here’s the code that worked:

$temp_query = clone $wp_query; 

$wp_query = new WP_Query( 'post_type=publication&posts_per_page=5' );

get_template_part( 'loop' );
/* get_template_part( 'loop' ) only seems to work if the query is in $wp_query */

$wp_query = clone $temp_query; ?>

Here’s the link in the codex that the clone $wp_query technique comes from: http://codex.wordpress.org/The_Loop#Multiple_Loops_Example_2