Allow query results to be indexed by variable name as string