The data pending checks are only performed on the sequence number of
the received data. However, it is expected that the index of the
stream (when applicable) has been written to disk by the time this
check returns that no data is pending.
This patch ensures that the minimum between the data and index
sequence numbers are used to perform this check.