Improve tree_entry_interesting() handling code