Structural perspective on constraint-based learning of Markov networks