Spanning trees and identifiability of a single-factor model