It is once hashed, but not copied:
hash = hash_and_copy (data, stride, NULL, -1, Bpp, width, height);
then, since it was not found in the cache (because it wasn't added to it in the first place - a different bug) it is hashed (and now copied) again:
hash_and_copy (data, stride,
Bpp, width, height);
There is no need to hash it again.
We could change hash_and_copy() not to hash if not needed.
Fixed when cache was added the QXL for Linux.