This addresses the issue with undefined variables that only occur in the body of rules and are not statically "defined".
@rkaminsk would it be enough to raise a warning somewhere in init if a domain of a variable has an upper/lower bound that is min/max (given by config) ?