Remove query envelope merging, solve perf issue