[#3579] Fixed UNION implementation for databases that support LIMIT / OFFSET