[3.8] Fix #1527 : Wrong offset for classic query result