All post ids are the same after this query but rewind_posts() does not seem to work here?

I found that one solution for this was to place a call to wp_reset_query() just before the close of the function call. I was trying to use rewind_posts() but it would not work. wp_reset_query() did the trick.

After doing that, thanks to @goldenapples excellent observation that I was already setting a pointer to the current $post object with my $current_page variable (duh!), I found that I could dump the wp_reset_query() call and instead just add this line in its place…

$post = $current_page;

The root cause is that I was resetting the $post object in the for loop (as $idx=>$post) and the query had to be reset so that the value of $post was a true reflection of the current $post object for the page in function calls below header.php