Fix bySegment metrics de-serialization

If the original query is bySegment, the results are never cached currently.