So, I had to explicitly define the key value pairs to get it to work when untrashing. Not sure why it worked everywhere else though as just an array of ids.
added:
$thisupdate = array (
'fields' => $pages,
'post_status' => 'publish'
);
wp_update_post( $thisupdate );