Fix a bug in the handling of implication constraints (Trac #1430)