Fix sequence with negative minvalue/maxvalue and negative increment. Thanks to jwiechmann for the report.