Correctly handle an empty equation in generate_constraints