Handle duplicate terms in linear objective.
Fixes #26