Fix offset application for flattened and non-flattened cases.