Fix interbase limit issue for subqueries
Merge pull request #2139 from timw4mail/develop

Fix interbase limit issue for subqueries