fix cardinality aggregator caching

The byte array defines the cache key. Without this change the byRow flag is not respected and you will get back wrong results if you ran the query a second time with the flag changed