It would probably be better to do a check first with the function, then generate the list using the current post id.
<?php
if ($post->post_parent) { //We Postare IDa notchild, theprint sameout sosub itmenu
has children wp_list_pages( array('title_li'=>'','include'=>$post->post_parent) );
<?php if wp_list_pages( array('title_li'=>'','depth'=>1,'child_of'=>$post->post_parent) );
}
//We are not a child but do we have children
$children = wp_list_pages(array('child_of' => $post->ID, !='echo' get_post_top_ancestor_id=> 0));
if ( !empty($children) ) {
?> //If so print out the sub menu
<?php wp_list_pages( array('title_li'=>'','include'=>$post->ID) ); ?>
<?php wp_list_pages( array('title_li'=>'','depth'=>1,'child_of'=>$post->ID) );
} ?>
<?php//Not }a child and not a parent so show nothing and continue
?>
I tested this and it works as you mentioned, I couldn't figure out that function however maybe someone can post a better solution using that function.