Since you are using global $post one thing that occurred to me is if there are any custom queries on the page make sure that wp_reset_postdata() is called. It could be that somewhere in your template the global $post variable is being reassigned without being reset.
Not sure if this is relevant but hope this is helpful!