Due to the complexity offset retrieval adds when used liked this, I'd suggest adding an inline comment here as to why you aren't just calculating the offset immediately.