Identify trees and spanning trees (#704)