[NUCRDBMS-738] Fix Firebird query range handling