I think these were the lines that actually fixed it. Basically it makes sure our epoch indices get shifted by the number of previous indices.