EDIT: Came up with a simpler example to show my problem. This patch only matches the second module. The only difference between the modules is the order of the nodes. Shouldn't it match both? PART [*] { @MODULE:HAS[@NODE[a],@NODE:HAS[#prop[b]]] { matched = true } } PART { MODULE { NODE { name = a } NODE { prop = b } } MODULE { NODE { prop = b } NODE { name = a } } }