Replaced push.apply() calls with custom concat() function so the V8 stack will not exhaust when a complex query is being processed