Fix a bug that caused the 'start' and 'end' arguments to History#query to be ignored