Fixed IndexError that originated from differentiation of parameters.
Fixed IndexError that originated from differentiation of parameters.

When a parameter goes to an unallowed negative value during
differentiation, the step size is scaled to prevent such an error
from occuring. However, the error handling was done incorrectly,
such that even the bad parameter sets were included with the good
differentiated parameter sets.

arosale4/q2mm,ericchansen/q2mm,Q2MM/q2mm,Q2MM/q2mm,ericchansen/q2mm,arosale4/q2mm