You have to add any query vars that are not WordPress objects to the array of recognized query vars to be able to retrieve it from the $wp_query
global:
add_filter( 'query_vars', 'wpa66452_query_vars' );
function wpa66452_query_vars( $query_vars ){
$query_vars[] = 'tree';
return $query_vars;
}