Fixes tree:has_value/2