writer: Correctly increase offset when writing ASes