flatten_cons: must return array
@@ -133,7 +133,7 @@ def flatten_constraint(expr):
# everything else (Element, globals)
# just recursively flatten args, which can be lists
if all(__is_flat_var_or_list(arg) for arg in expr.args):
- return expr
+ return [expr]
else:
# recursively flatten all children
flatvars, flatcons = zip(*[flatten_subexpr(arg) for arg in expr.args])
