The invariant graph has to be applied in topological order, not just breadth-first. Aside from that, variable nodes that contain just single values, and are therefore nor "free variables" nor "defined variables" in terms of the implementation of the invariant graph builder, should be treated as roots of the invariant graph as well. Finally, when going through the constraints of the model, first we should try to make them implicit constraints.
The invariant graph has to be applied in topological order, not just breadth-first. Aside from that, variable nodes that contain just single values, and are therefore nor "free variables" nor "defined variables" in terms of the implementation of the invariant graph builder, should be treated as roots of the invariant graph as well. Finally, when going through the constraints of the model, first we should try to make them implicit constraints.