Enforce stream order for counter_derivative.

This will be required when we implement backward processing of
the derived stream to process the input streams in proper order.