Loop when sending changes to the secondary until there are no more changes to send.

This was broken in a6f9e35fcd344d02cfce68c07ef404c5ae6a2c08, so we were pausing between
each operation which is not ideal.