First pass at QueryHelper fix for inlineCount/select/skip/take bug