Minor improvement to tree Range()