Query engine: fix NPE when result set size is 0 for wide-rows