Fixed xquery issue that resulted in zorba memory leak.