Add a toFinalOffset() helper function.