fixes bug in replication where a commit on the slave would cause wrong calculation of new Last CID