I had the same problem.
Then I tried to use binary variables instead, and the problem went away.