[3.7] Fix #1118 : API does not return records starting at right offset